Event question?

J

jiangyh

hi there:

I have a datagrid in my web form that contain a templet column.And in
this templet have a checkbox web control.I will get the checkbox state in my
serverside.

My question is which event I will add to my codebehind when I change the
checkbox state.

Thanks in advice.
jiangyh
 
S

Shiva

In the <asp:CheckBox ...> tag, have OnCheckedChanged attribute that has the
name of the server-side event name. Eg:

<asp:Checkbox Runat=Server id="chk" OnCheckedChanged="CheckBox_Clicked" />

In the code-behind file:

void CheckBox_Clicked(Object sender, EventArgs e)
{

}

hi there:

I have a datagrid in my web form that contain a templet column.And in
this templet have a checkbox web control.I will get the checkbox state in my
serverside.

My question is which event I will add to my codebehind when I change the
checkbox state.

Thanks in advice.
jiangyh
 
J

jiangyh

hi Shiva:

thanks you help

But my Checkbox webControl in the DataGrid Template Column,so it can't
use OnCheckedChanged Event.

How to resolve this. thanks a lot.
jiangyh
 
S

Shiva

Hi,
You can use it for TemplateColumn check boxes too.

hi Shiva:

thanks you help

But my Checkbox webControl in the DataGrid Template Column,so it can't
use OnCheckedChanged Event.

How to resolve this. thanks a lot.
jiangyh
 

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

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top