How does a nested datagrid reference parent row in master datagrid?

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

  1. John Dalberg

    John Dalberg Guest

    I have a nested datagrid in each row of a master datagrid. The nested grid
    has full functionality of inline edits. How do I reference the datakey
    collection of the master datagrid passing the proper collection index?

    For example, if someone clicks 'edit' or 'update' link in the child
    datagrid of the second row of the master datagrid, I need to be able to
    reference the DataKeys collection of the master datagrid passing the index
    of 1 which is the second row... all this from the updatecommand event
    handler of the child datagrid.

    John Dalberg
    John Dalberg, Dec 20, 2005
    #1
    1. Advertising

  2. John Dalberg

    Elton Wang Guest

    You can try

    child.NamingContainer and cast it to a datagridrow


    HTH


    "John Dalberg" <> wrote in message
    news:20051220123822.801$...
    >I have a nested datagrid in each row of a master datagrid. The nested grid
    > has full functionality of inline edits. How do I reference the datakey
    > collection of the master datagrid passing the proper collection index?
    >
    > For example, if someone clicks 'edit' or 'update' link in the child
    > datagrid of the second row of the master datagrid, I need to be able to
    > reference the DataKeys collection of the master datagrid passing the
    > index
    > of 1 which is the second row... all this from the updatecommand event
    > handler of the child datagrid.
    >
    > John Dalberg
    Elton Wang, Dec 20, 2005
    #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. Roy
    Replies:
    2
    Views:
    3,102
  2. Doug McCann
    Replies:
    1
    Views:
    993
    William Brogden
    Aug 5, 2004
  3. H5N1
    Replies:
    0
    Views:
    2,700
  4. katmagic
    Replies:
    0
    Views:
    1,236
    katmagic
    Dec 26, 2008
  5. D
    Replies:
    0
    Views:
    198
Loading...

Share This Page