I want to define a template field with a checkbox on a grid view in asp.net like this:
TemplateField tf = new TemplateField();
tf.ItemTemplate = new System.Web.UI.WebControls.CheckBox();
gridView1.Columns.Add(tf);
but this error appears:
cannot implicitly convert 'System.Web.UI.WebControls.CheckBox' to 'System.Web.UI.ITemplate'.
you can do that like this