0

Hi

i have a dataset already created (which may consist of many tables)

now i would liek to fill the datagrid view from it. BY CODE

how can i do so?

2
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by xanawa
0

You can bind it (this is the best solution and th fastest).

dataGridView1.DataSource = new BindingSource(myDataSet.Tables["tableName"], null);

Thats it!
And the data will appear in the DGV.

0

You can bind it (this is the best solution and th fastest).

dataGridView1.DataSource = new BindingSource(myDataSet.Tables["tableName"], null);

Thats it!
And the data will appear in the DGV.

I did that but only the column headers are displaying

0

what was is? It was yout sql query? Was not ok before?

yes because i had some data entered which did not enter properly maybe because i had some bugs in my application

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.