Thursday, June 30, 2011

How will you check all the checkboxes in a Grid ?

Can be done using javascript or code-behind(server code)

1. in javascript, access the gridview and then iterate through all child elements of type "checkbox".
then set the check if not already set using
using jquery this is simpler :

2. in the code behind use the DataRowBind method to check all the check boxes, accessing cells of the row, then identifying cell type of checkbox and then call clickon each item
(to be verified)

No comments:

Post a Comment