Results 1 to 6 of 6

Thread: child command in a datagrid

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Posts
    142

    child command in a datagrid

    Is it possible to view the results of both the parent and child command in the same data grid object??

    I have a command(data environment) that gets certain employee's then in the child command I see when these certain employees have punched in or punched out durring the week. Now I would like to show these results on the form. But I can't seem to find a component that supports this..


    example

    Harry Legs
    monday 8am- 11h59
    monday 12h05 - 5h
    Tuesday 7h59- 12h
    Clay Henry
    monday 8am - 12h

  2. #2
    Hyperactive Member crosbj's Avatar
    Join Date
    Oct 2000
    Location
    Michigan
    Posts
    285
    Use the MSHFlexgrid.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Posts
    142
    Is flexgrid compatible with the data environment? ... every time I try to connect to the de it gives me error "no compatible datasource found" ..

  4. #4
    Hyperactive Member crosbj's Avatar
    Join Date
    Oct 2000
    Location
    Michigan
    Posts
    285
    I don't set the data source until runtime so the control doesn't show any data source or data member. Here is a sample of how I populate a flex grid using the de.
    Code:
    'material detail
                If chkRptOpt(1).Value = 1 Then
                    'close recordsets
                    If .rsMaterialDetail_Grouping.State = adStateOpen Then
                       .rsMaterialDetail_Grouping.Close
                    End If
                    
                    'sql text box
                    MaterialSql = .rsMaterialDetail_Grouping.Source
                                    
                    'open recordsets
                    .MaterialDetail_Grouping txtWONum.Text 'form grid
                    
                    'check for records and populate grid
                    If .rsMaterialDetail_Grouping.RecordCount >= 1 Then
                       'grid properties
                       Set MSHFlexGrid1(1).DataSource = .rsMaterialDetail_Grouping
                       MSHFlexGrid1(1).ColWidth(0) = 250
                       MSHFlexGrid1(1).ColWidth(1, 0) = 1500
                       MSHFlexGrid1(1).ColWidth(2, 0) = 1500
                       MSHFlexGrid1(1).ColWidth(3, 0) = 2000
                       MSHFlexGrid1(1).ColWidth(0, 1) = 0
                       MSHFlexGrid1(1).ColWidth(1, 1) = 0
                       MSHFlexGrid1(1).ColWidth(2, 1) = 0
                       MSHFlexGrid1(1).CollapseAll
                       MSHFlexGrid1(1).Visible = True
                       'allow report
                       rptMaterial = True
                    Else
                       MSHFlexGrid1(1).Visible = False
                       rptMaterial = False
                    End If
                Else
                    MSHFlexGrid1(1).Visible = False
                    rptMaterial = False
                End If

  5. #5
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    I think Jacsoftware is confusing MSFlexgrid which is incompatible with dataenv and ADO, with MSHFlexgrid which is the one we're talking about.
    VB 6.0, Access, Sql server, Asp

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Posts
    142
    that's exactly what the problem was!!! thanks there Ralphe boy!!!!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width