GridView-Adding TemplateField programatically

G

Guest

This seems more diffciult than it should be, can someone provide any insight?
Platform is VB 2005, gridview on a web page.

I have this code in the aspx file of a GridView control:

<asp:TemplateField >
<ItemTemplate>
<asp:CheckBox ID="chkNotifierAdd" runat="server"/>
</ItemTemplate>
</asp:TemplateField>

I need to add the TemplateField, ItemTemplate, and Checkbox controls all
programatically, not hard wired in the aspx. I can instantiate a template
field object, but I cannnot instantiate a ItemTemplate object (the
ItemTemplate class doesn't exist) to subsequently add my checkbox. What is
the procedure?

Thanks - Hedge
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top