Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
888
Checkbox TemplateDataField status on Server Side
posted

I am using a TemplateDataField with a checkbox template defined for the first column of my grid.  The purpose is to allow the end user to select multiple rows and then use a dropdown and button to perform actions on the selected rows.  The rub is when I try to loop over the rows, I am not being able to find out the state of the checkbox for a given row.  Below is what I am trying to do:

protected void Button1_Click(object sender, EventArgs e) {

foreach (GridRecord row in this.WebDataGrid1.Rows) {

CheckBox cb = this.GetCheckBox(row.Items[0].Template);

}

}

However, the Template is NULL for each and every row.  I have doubled checked to make sure other "Items" don't contain the CheckBox template, and they are all NULL. 

How on the server side am I suppose to interact with the template for a given cell / item?

Parents
No Data
Reply Children
No Data