Handling events for Checkboxes in Data Grid

  • Thread starter Abhijit Salvi via .NET 247
  • Start date
A

Abhijit Salvi via .NET 247

(Type your message here)

--------------------------------
From: Abhijit Salvi

Hi All,

I am working on a DataGrid that has a column of Checkbox Controls. There is some Business Functionality that I need to accomplish when the Checkboxes in the column are checked or unchecked, basically on the 'onCheckChanged' Event of the checkbox.

However I am not able to get handle to this event of the Checkbox.

I have found numerous examples on the net for Checkbox in Repeaters but I guess the same does not work with checkbox in Data Grids. The 'onCheckChanged' event needs to be "raised".

I get the following errors
'Public Event CheckedChanged(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

'System.EventHandler' is a delegate type. Delegate construction permits only a single AddressOf expression as an argument list. Often an AddressOf expression can be used instead of a delegate construction.

Have you or any body you know tried using Checkboxes in datagrid. I would greatly appreciate any help wrt this.

Thanks in advance,

Regards,
Abhijit
 
J

jfleeson

Checkbox: add the CommandName CheckChanged.
DataGrid: add an event handler for the Item Command. in the method for Item
Command check is see if the command name is CheckChanged.


Abhijit Salvi via .NET 247 said:
(Type your message here)

--------------------------------
From: Abhijit Salvi

Hi All,

I am working on a DataGrid that has a column of Checkbox Controls.
There is some Business Functionality that I need to accomplish when the
Checkboxes in the column are checked or unchecked, basically on the
'onCheckChanged' Event of the checkbox.
However I am not able to get handle to this event of the Checkbox.

I have found numerous examples on the net for Checkbox in Repeaters
but I guess the same does not work with checkbox in Data Grids. The
'onCheckChanged' event needs to be "raised".
I get the following errors
'Public Event CheckedChanged(sender As Object, e As System.EventArgs)' is
an event, and cannot be called directly. Use a 'RaiseEvent' statement to
raise an event.
'System.EventHandler' is a delegate type. Delegate construction permits
only a single AddressOf expression as an argument list. Often an AddressOf
expression can be used instead of a delegate construction.
Have you or any body you know tried using Checkboxes in datagrid. I
would greatly appreciate any help wrt this.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top