Nested Datagrids Events Question

Discussion in 'ASP .Net Datagrid Control' started by seal, Mar 22, 2006.

  1. seal

    seal Guest

    I was struggling with a nested control event not firing and I found the
    culprit to be the following line in my code behind,
    e.Item.Cells[2].Controls.Add(MyNewDatagrid);

    Is there a way to add a datagrid this way, and still get the events?

    Thanks
     
    seal, Mar 22, 2006
    #1
    1. Advertisements

  2. seal

    Elton Wang Guest

    Before MyNewDatagrid's data binding, you should create its event delegate.
    And this should also be created before Page_Load.

    HTH

    "seal" <> wrote in message
    news:...
    >I was struggling with a nested control event not firing and I found the
    > culprit to be the following line in my code behind,
    > e.Item.Cells[2].Controls.Add(MyNewDatagrid);
    >
    > Is there a way to add a datagrid this way, and still get the events?
    >
    > Thanks
     
    Elton Wang, Mar 23, 2006
    #2
    1. Advertisements

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. Dave

    Nested DataGrids

    Dave, Jul 15, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    732
    S. Justin Gengo
    Jul 15, 2003
  2. Dave

    Nested DataGrids

    Dave, Jul 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    496
    Ray Dixon [MVP]
    Jul 21, 2003
  3. Dave T

    Edit Nested Datagrids

    Dave T, Nov 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    494
    Dave T
    Nov 3, 2003
  4. ProgramAnalyst

    nested datagrids

    ProgramAnalyst, Nov 4, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    586
    ProgramAnalyst
    Nov 5, 2004
  5. David Lozzi

    SQL, XML, Nested Datagrids and the like

    David Lozzi, Oct 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    504
    Frankie
    Oct 7, 2005
  6. Steve Hershoff
    Replies:
    6
    Views:
    449
    Steve Hershoff
    Aug 30, 2006
  7. Steve Hershoff

    Nested datagrids -- events not handled correctly

    Steve Hershoff, Aug 27, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    6
    Views:
    315
    Steve Hershoff
    Aug 30, 2006
  8. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    653
    Chris
    Aug 30, 2005
Loading...