(CheckBox in HeaderTemplate to) Select All CheckBoxes inside a GridView using JavaScript
July 16, 2008 2 Comments
In one of my previous blog post, I Described about Mutually Exclusive CheckBox inside GridView.
In this example, there is a “Select All” checkbox in header to select/deselect all the checkboxes inside GridView. MoreOver, if user select all the checkboxes manually one by one, then header checkbox should automatically be selected and vice versa.
Here is the Scenario; There is one TemplateColumn in GridView which is used to Select Row within GridView. So, There will be CheckBox inside ItemTemplate of that TemplateColumn. User would be able to select more than one CheckBox in that Column. And to Select All the CheckBoxes of that colum, There will be a “Select All” CheckBox in HeaderTemplate of that GridView. When user check “Select All” CheckBox in Header, all the checkboxes should be selected and vice versa.
