How to use Data Table

Friday, August 21, 2009

Below code will teach you how to use DataTable in C#

To create datatable and add table to dataset

DataSet ds1=new DataSet();
DataTable table=ds1.Tables.Add("Table");

to add columns in table

keep adding..........

to create new row in the datatable

DataRow row=table.NewRow();

to add item in the itemarray of the table and you can add later all together in table


Add complete row form itemarray of table to actual table


For More details contact,
Rajesh Singh
Asp.Net Developer
Indianic infotech ltd (India)

No comments :