Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a Gridview with 6 rows and a checkbox. If I select one checkbox , I want to raise an event.
In my code, the checkbox is selected but not entering the event. Should any correction be made or can anyone guide me?
XML
<asp:GridView ID="GridView1" runat="server"
style="z-index: 1; left: 195px; top: 495px; position: absolute; height: 152px; width: 232px">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkSelect1" runat="server" OnCheckedChanged="chkSelect1_checkedchanged"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>


C#
protected void chkSelect1_checkedchanged(object sender, EventArgs e)
   {

   }
Posted

1 solution

You cannot RAISE events,you can HANDLE events.Refer to the links below:

Checkbox in TemplateField ItemTmplate

(Example)How to handle events related to template fileds in gridview
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900