Click here to Skip to main content
15,877,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridview with checkbox inside asp:TemplateField. I wish to select multiple checkboxes and on button click I want to add those selected rows in another page which consists of the repeater.Also I want to give the ability to the user to select a single row when any of the row is clicked.

My problem is when I click any of the checkbox,the rowcommand gets fired and one record gets added to the repeater.
I wish to prevent this rowcommand event to get fired when checkbox is checked/unchecked.

Kindly guide me on this issue.
walterhevedeich 10-Feb-12 3:54am    
Can you post the tags inside the TemplateField? I just tried putting a checkbox inside a TemplateField and ticked it but the RowCommand event never got triggered.
Warreer 10-Feb-12 5:14am    
<input type="checkbox" runat="server" id="CheckHeader" />
<HeaderStyle CssClass="FixedHeader" />
<input type="checkbox" runat="server" id="ChkBox" />

Warreer 10-Feb-12 5:38am    
Can you also make sure that you have defined the rowcommand event ?

Please give autopostback property set to false and then try it.
Share this answer
Warreer 10-Feb-12 7:59am    
I tried that already, but did not work.
check this link

Hope it helps you!
Share this answer

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