(CheckBox in HeaderTemplate to) Select All CheckBoxes inside a GridView using JavaScript

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.

Read More…

Mutually Exclusive CheckBox inside GridView

I was having a development requirement in which i have to implement CheckBoxes inside GridView.
Scenario is like, There is one TemplateColumn in GridView which is used to Select any Row within GridView. So, There will be CheckBox inside ItemTemplate of that TemplateColumn.

User would be able to select only one CheckBox (Mutually Exclusive) in that Column. If user select any other CheckBox in that Column, then Previously Selected CheckBox should be unchecked.
Here, I cant use RadioButton, as User should also be able to deselect the selected CheckBox, which is not possible with RadioButton.

Read More…

Follow

Get every new post delivered to your Inbox.