K keithb Mar 30, 2006 #1 What is required to dynamically add columns to a GridView control? Thanks, Keith
B Bruno Piovan Mar 30, 2006 #2 Keith, to add columns to a gridview, use the add method passing as parameter the column you want..... i.e. With GridView1.Columns .Add(New BoundField) .Add(New CheckBoxField) .Add(New HyperLinkField) .Add(New ImageField) .Add(New ButtonField) .Add(New CommandField) .Add(New TemplateField) End With of course instead of passing a new instance as a parameter, declare it and set the values as you want..... is that what you asked?? Bruno
Keith, to add columns to a gridview, use the add method passing as parameter the column you want..... i.e. With GridView1.Columns .Add(New BoundField) .Add(New CheckBoxField) .Add(New HyperLinkField) .Add(New ImageField) .Add(New ButtonField) .Add(New CommandField) .Add(New TemplateField) End With of course instead of passing a new instance as a parameter, declare it and set the values as you want..... is that what you asked?? Bruno