Loading datarows into datagrid?

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..
 
J

j.wedervoort

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:
 
J

Junnys, Caesar Group (www.caesar.nl)

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();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top