We have a GridView with multiple columns. Two of those columns contain CheckBoxes whilst the rest contain either TextBoxes or DropDownLists.
The form on which the GridView is placed is embedded within a Master Page.
Using a CheckBox in the Header Row we want to set all the checkboxes in the final column to the state of the CheckBox in the header. We don't want to set the checkbox that is in the 4th column. The CheckBox has an Id of "chkUpdate"
Examples I've seen only have 1 checkbox per row and identify it using the CSS class but both of the checkboxes on our GridView row use the same CSS Class and it seems wrong to have to create a new CSS Class purely to identify a different column of CheckBoxes
I know I could use an each loop on the rows of the GridView but cannot work out how to identify the checkbox in the final column
function checkAll(objRef) {
$("#<%=gv_Vials.ClientID %> tr").each(function() {
//What goes here? = objRef.checked;
};
}
I hope I've explained what I require but if anyone needs further clarification please feel free to ask