471,047 Members | 1,283 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,047 software developers and data experts.

### vb.net DataGrid problem, cant make unbound columns ###

Iam very new to .net, in vb6 there was the flexigrid component, you could add rows, columns .. change their width, height, header captions etc very easily... but in .net all I see is one DataGrid.

I want to add columns and rows to it, change their header captions etc but it does not give me any options to add columns or rows!

I have found one way of adding columns :-

Dim table as new DataTable
table.columns.add("C1")
DataGrid.datasource = table

And that adds the column... but surely this is an unefficent way? there must be a better way of doing this.. I mean what if I wanted to add cols dynamically... this would mean I add them to the table then I had to call some sort of refresh on the datagrid, this makes the longwindedness seem more clear.

Anyone know a better way please share it.. i would be very greatful.

Thankyou
Nov 20 '05 #1
1 2976
Check out the DataGridColumnStyles object

Regards

"BuzzLight" <Bu*******@Domain.com> wrote in message
news:8D****************@news-binary.blueyonder.co.uk...
Iam very new to .net, in vb6 there was the flexigrid component, you could add rows, columns .. change their width, height, header captions etc very
easily... but in .net all I see is one DataGrid.
I want to add columns and rows to it, change their header captions etc but it does not give me any options to add columns or rows!
I have found one way of adding columns :-

Dim table as new DataTable
table.columns.add("C1")
DataGrid.datasource = table

And that adds the column... but surely this is an unefficent way? there must be a better way of doing this.. I mean what if I wanted to add cols
dynamically... this would mean I add them to the table then I had to call
some sort of refresh on the datagrid, this makes the longwindedness seem
more clear.
Anyone know a better way please share it.. i would be very greatful.

Thankyou

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kevin | last post: by
3 posts views Thread by rawCoder | last post: by
2 posts views Thread by Bob Trabucco | last post: by
1 post views Thread by Bob Trabucco | last post: by
7 posts views Thread by Juan Romero | last post: by
3 posts views Thread by TPhelps | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.