Loading datarows into datagrid?

  • Thread starter Thread starter Prince
  • Start date Start date
P

Prince

hi all,

I need to insert a datarows collection from a datatable into a
datagrid?can anyone tell me how to do???
Thanx in advance..
 
You need to bind the datatable to the datagrid.
First assign the table to the datasource roperty of the grid and then
call the bind method.

Junnys, Caesar Group

Will you be my new colleague? Visit www.caesar.nl



Prince schreef:
 
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here

DataTable myTable;

///load data
///
DataGrid1.DataSource=myTable;
DataGrid1.DataBind();
}
 
Back
Top