Results 1 to 5 of 5

Thread: Child and Parent datagrid problem!

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2008
    Posts
    38

    Question Child and Parent datagrid problem!

    Hi all,

    Here is my code:

    da1.Fill(ds, "Parent")
    da2.Fill(ds, "Child")
    Dim DataRelation As New DataRelation("Family", ds.Tables("Parent").Columns("CaseID"), ds.Tables("Child").Columns("CaseID"), False)
    ds.Relations.Add(DataRelation)
    Dim dv As New DataView(ds.Tables("Parent"))
    PublicDS = ds

    dgSearch.DataSource = dv

    '-----------datagrid
    Try
    dts1.MappingName = "Parent"
    dgSearch.TableStyles.Add(dts1)
    dgSearch.TableStyles(0).GridColumnStyles(0).Width( ) = 0
    dgSearch.TableStyles(0).GridColumnStyles(4).Width( ) = 0
    Catch ex As Exception

    End Try

    The problem is I will see the relation’s name(Family) when I click at the + beside parent name and I should click on that name and then I can see the child.
    I need to see child when I click on +.

    Please help me.
    Last edited by Sep410; Aug 19th, 2008 at 12:22 PM.

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