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.
Thanks.
I assume that you’ve added javascript on the complete row so that the row gets selected when the user clicks the row. The checkbox is part of the row what is the reason for the immediate postback. So you need to add the Javascript to all cells without the checkbox-cell.
You could use RowDataBound:
Edited according to your comment.