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

  • Thread starter Thread starter BuzzLight
  • Start date Start date
B

BuzzLight

Hi I saw the help file for the DataGridColumnStyles object but after reading the overview of it I didnt understand anything... its way too complex for a beginnner like me :( Is it possible for you to give me a simple explanation.. and how I could use that object for what I want?

For people reading this first time : What I want is an easy way of creating rows and cols just like on a flexigrid in vb6.

Thanks

BuzzLight said:
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.
 
Sorry to disappoint you but the Datagrid does not work in unbound mode like
flexgrid.
You need to create a dataset,datatable


BuzzLight said:
Hi I saw the help file for the DataGridColumnStyles object but after
reading the overview of it I didnt understand anything... its way too
complex for a beginnner like me :( Is it possible for you to give me a
simple explanation.. and how I could use that object for what I want?
For people reading this first time : What I want is an easy way of
creating rows and cols just like on a flexigrid in vb6.
 
I didn't see your original post. If you want to use an unbounded grid,
try the free grid at http://www.devage.com/SourceGrid/SourceGrid.html.

The grid is pretty good, and you can get the source code if there is
anything that you need to change. The code is written in C# instead of
VB. The grid uses all managed code as well.

The demo that comes with the grid is comprehensive.

The author is great about responding to questions.

HTH
Shane
 
Back
Top