Hi all,
I have a gridview and now I need to add a column with checkboxes.
The checkboxes need to be checked or unchecked depending on the data retrieved.
Can anyone help on this coding.
Thanks
View Complete Post
Hello members,
I have used "Check box" inside the gridview...
I need,
If i select the header check box , It should select all the checkbox inside the gridview...
I have searched in google for this coding ...I got lot of codes but couldn't get the correct code...
I request anyone please provide me the correct code(using Javascript) thanks...
I have checkBoxes in my Gridview templete columns called "Category A" and "Category B". I want Select-All functionality, i.e. when the user checks the Select-All check Box in category A column, all the checkboxes must get checked under that column. Same for Category B. I am trying with the code below. The problem with my code is, it selects all the check boxes in the entire gridview, "Category A" as well as "Category B"s checkboxes. But, I want only checkboxes selected under the same column.
function SelectAllCheckboxesA(chk) { $('#<%=gvSurveys.ClientID %>').find("input:checkbox").each(function() { if (this != chk) { if ($(this).hasClass('CatA') != false) { this.checked = chk.checked; } } else { alert($(this)) } }); } <asp:GridView ID="gvSurveys" runat="server" AutoGenerateColumns="false" AllowSorting="True" Width="1500px"> <Columns> <asp:TemplateField> <HeaderTemplate>Category A <asp:CheckBox ID="chkSelectAllCatA" runat="server" Visible="false" onclick="javascript:SelectAllCheckbox
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend