Firing events for child controls in a DataGrid

Discussion in 'ASP .Net' started by =?Utf-8?B?Z2xlbm4=?=, Jul 19, 2006.

  1. Hi folks,

    Apparently, when you have a child control inside of a DataGrid, the event
    handler for the control does not work. I want to put a child control
    (checkbox, dropdownlist, etc.) into my datagrid and have the value selected
    to immediately fire an event and immediately update my database.

    For example, if a checkbox is checked (in a DataGrid there would be a
    checkbox column with a checkbox in each row), an event would be fired to
    update the database which in this case would have a boolean value indicating
    whether the checkbox had been checked or unchecked.

    thanks,
    Glenn
     
    =?Utf-8?B?Z2xlbm4=?=, Jul 19, 2006
    #1
    1. Advertising

  2. Did you try the ItemCommand event of DataGrid?

    "glenn" wrote:

    > Hi folks,
    >
    > Apparently, when you have a child control inside of a DataGrid, the event
    > handler for the control does not work. I want to put a child control
    > (checkbox, dropdownlist, etc.) into my datagrid and have the value selected
    > to immediately fire an event and immediately update my database.
    >
    > For example, if a checkbox is checked (in a DataGrid there would be a
    > checkbox column with a checkbox in each row), an event would be fired to
    > update the database which in this case would have a boolean value indicating
    > whether the checkbox had been checked or unchecked.
    >
    > thanks,
    > Glenn
     
    =?Utf-8?B?ZG90bmV0dGVzdGVy?=, Jul 19, 2006
    #2
    1. Advertising

  3. No, I have not tried the ItemCommand.

    I will give it a shot ...

    Thanks,
    Glenn

    "dotnettester" wrote:

    > Did you try the ItemCommand event of DataGrid?
    >
    > "glenn" wrote:
    >
    > > Hi folks,
    > >
    > > Apparently, when you have a child control inside of a DataGrid, the event
    > > handler for the control does not work. I want to put a child control
    > > (checkbox, dropdownlist, etc.) into my datagrid and have the value selected
    > > to immediately fire an event and immediately update my database.
    > >
    > > For example, if a checkbox is checked (in a DataGrid there would be a
    > > checkbox column with a checkbox in each row), an event would be fired to
    > > update the database which in this case would have a boolean value indicating
    > > whether the checkbox had been checked or unchecked.
    > >
    > > thanks,
    > > Glenn
     
    =?Utf-8?B?Z2xlbm4=?=, Jul 19, 2006
    #3
    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. Juan Romero
    Replies:
    2
    Views:
    4,896
    Juan Romero
    Apr 19, 2004
  2. SevDer
    Replies:
    2
    Views:
    1,320
    Walter Wang [MSFT]
    Nov 13, 2007
  3. Replies:
    0
    Views:
    217
  4. David Boike

    Child controls in Composite Controls not firing events

    David Boike, Aug 7, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    328
    David Boike
    Aug 7, 2003
  5. glenn

    Firing events for child controls inside a DataGrid

    glenn, Jul 19, 2006, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    373
    Alessandro Zifiglio
    Jul 19, 2006
Loading...

Share This Page