Table to Grid

  • Thread starter Thread starter SK
  • Start date Start date
S

SK

How to bind a grid using table?
I've a table and I want to see that data in a grid for sorting and
pagination. Please provide an example.

Thanks,
XD
 
i think you are talking about the datatable,

you must fill a dataset first, then call this,

Datagrid1.Datasource = ds.Tables(0)
Datagrid1.Databind();

This will show the data in your datagrid, also make sure that you turn on
the check in autogenerate columns in Datagrid Property Builder
 
No it is not datatable. It is normal web.UI.webcontrols.Table
I want to view the data in gridview1 than a table.

- Thanks
 
Then again you have to follow same approach, construct a datatable, Iterate
through every row of ur HTML table n fill that Datatable then bind that
Datatable to ur gridview....
 
Back
Top