Access CheckBox in DataGrid ItemTemplate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wish to access CheckBox control in ItemTemplate, to set or get value.
I use next code on event: ItemDataBound(...)
//-------------
e.Item.Cells[0].FindControl("CheckBox1")
//-------------
to access desired checkbox.

Is there exist some faster way to access this control then method
FindControl().
Maybe something like: e.Item.Cells[0].Controls[0], to access control
directly from index.

Thanks
 
Yes, if you know the index you can use e.Item.Cells[0].Controls. I am not
sure if it will affect the application performance in any way though.

Eliyahu
 
Back
Top