mercredi 5 septembre 2018

How can I define templatefield with check box in ASP.NET with programming?

I want to define a templatefield with checkbox on gridview in asp.net with programming. like this: TemplateField tf = new TemplateField(); tf.ItemTemplate = new System.Web.UI.WebControls.CheckBox(); gridView1.Columns.Add(tf);

but this error appear: cannot implicitly convert 'System.Web.UI.WebControls.CheckBox' to 'System.Web.UI.ITemplate'.




Aucun commentaire:

Enregistrer un commentaire