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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top