I have a function in an application:
private void ds_ItemBound(object sender, DataGridItemEventArgs e)
where in this line:
((System.Web.UI.WebControls.CheckBox)(e.Item.Cells[3].Controls[0])).Checked = false;
I get an exception:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.CheckBox'.
How do I solve this casting error?
Thanks for your help.