How to get key value in a master datagrid from a detail datagrid?

Discussion in 'ASP .Net' started by John Dalberg, Dec 20, 2005.

  1. John Dalberg

    John Dalberg Guest

    I have a nested datagrid in a datagrid. Each row in the master datagrid
    will have a child datagrid. One of the columns in the child datagrid has a
    copy of the key of the master row.


    However when the child datagrid is empty and a user needs to a add a new
    row, I have no reference to which master row they are in.

    How do I reference the Datakeys collection of the master datagrid and the
    needed index when a user clicks a button in the child datagrid? My add
    button is in the footer of the child datagrid.

    John Dalberg
    John Dalberg, Dec 20, 2005
    #1
    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. Tom Kaminski [MVP]

    Use a single DataGrid to show Master/Detail records?

    Tom Kaminski [MVP], Nov 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    489
    Tom Kaminski [MVP]
    Nov 10, 2003
  2. asmj
    Replies:
    0
    Views:
    490
  3. Arun Kumar Menon

    Master Detail detail

    Arun Kumar Menon, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    184
    Arun Kumar Menon
    Aug 6, 2003
  4. John Dalberg

    How to get key value in a master datagrid from a detail datagrid?

    John Dalberg, Dec 20, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    127
    John Dalberg
    Dec 20, 2005
  5. Frederik Borg

    ASp.net data binding: Master-detail-detail

    Frederik Borg, Jun 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    346
    Frederik Borg
    Jun 9, 2006
Loading...

Share This Page