Dynamically add columns to a GridView control?

B

Bruno Piovan

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
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top