adding templatefield dynamically to gridview

rage2021

New member
Joined
Oct 3, 2007
Messages
2
Programming Experience
Beginner
so im trying to add a checkboxlist to a gridview, using the itemtemplate. it works fine if i do it manually in the asp code but im trying to do it dynamicaly using vb.net so i can rearrange the order of columns and change headertexts later on.

anyways this is what I got


VB.NET:
Dim TF As TemplateField
TF = New TemplateField()

Dim value As ITemplate
value = TF.ItemTemplate



Dim CB As CheckBoxField
CB = New CheckBoxField
CB = TF.InsertItemTemplate()

S2GridAdd.Columns.Add(TF)

column shows up with no checkboxes, any ideas?
 
Last edited by a moderator:
Thread moved to Web Grids forum. Several of the forums in ASP.Net section would also have been better suited for the original post.
 
Back
Top