Need Datagrid help

  • Thread starter Thread starter Moondog
  • Start date Start date
M

Moondog

I'm using a VB.NET datagrid and need a little help on presentation.
When my datagrid comes up it only shows a small plus sign for the user
to click on, then it shows the word 'table' for the user to click on
again, finally the user can see the data. How do I set this to show
the data without the need to click on anything?

Next, the header defaults to "NewDataSet". How do I eliminate the
header?

And lastly, how do I adjust the column widths?


Thanks,
(e-mail address removed)
 
You're probably setting the datasource to a dataset.

set the datasource to the table in the dataset and set the name of the the
table you're filling.

dataadapter.fill(yourdataset, "WhatYouWantDisplayedIfAnything")
yourdatagrid.datasource = yourdataset.tables(0)
OR
yourdatagrid.datasource = yourdataset.tables("WhatYouWantDisplayedIfAnything")
 
Thanks chris. I knew it was going to be something simple like that.

Dominic Isaia
(e-mail address removed)
 
Back
Top