Parent/Child/"Grandchild" rows

Discussion in 'ASP .Net Datagrid Control' started by Bill Greenley, Sep 12, 2003.

  1. I have three grids: call them parent, child and grandchild. I can get the
    CreateChildView to work just fine from parent to child. ParentRowView based
    on SelectedIndex of underlying datamember of parent row. However, how does
    this work when a row in child grid is selected in order to do a
    CreateChildView for the next level and show the "grandchild" rows in the 3rd
    grid? tia
     
    Bill Greenley, Sep 12, 2003
    #1
    1. Advertising

  2. in SelectedIndexChanged of parent grid....

    Dim ParentView As New DataView(DsParentHistory.Tables("Parents"))
    iCurrentRowIndex = dgParentHistory.SelectedIndex + (dgParentHistory.CurrentPageIndex * dgParentHistory.PageSize)
    Dim currentRowView As DataRowView = ParentView(iCurrentRowIndex)
    dgChildren.DataMember = ""
    dgChildren.DataSource = currentRowView.CreateChildView("Parents2Children")
    dgChildren.DataBind()

    I don't know what to use for the underlined line of code in the corresponding sub for SelectedIndexChanged in the child grid to populate the dgGrandChildren datagrid via the relation Children2Grandchildren



    "Pranav Shah" <> wrote in message

    news:...

    You want to create a relationship based on both related columns. Look
    at the overload method of DataRelation method that you are currently
    using.
     
    Bill Greenley, Sep 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SSBhbSBTYW0=?=

    Parent/Child/Grandchild Nested Datatables

    =?Utf-8?B?SSBhbSBTYW0=?=, Feb 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    456
    =?Utf-8?B?SSBhbSBTYW0=?=
    Feb 27, 2005
  2. wooks
    Replies:
    0
    Views:
    351
    wooks
    Jul 22, 2004
  3. K B
    Replies:
    1
    Views:
    1,251
    Rolf Cerff
    May 8, 2006
  4. Noel Dolan
    Replies:
    0
    Views:
    249
    Noel Dolan
    Jul 18, 2004
  5. Bitswapper
    Replies:
    5
    Views:
    162
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page