468,512 Members | 1,429 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

### 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 2944
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
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.