-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Star_Venkat
Message 3 in Discussion
Hi Kumar, You need clarification for the line specified. Is it so,
dt.Columns.Add(new DataColumn("StringValue", typeof( string))); Adding a new
column to the data table is done in the above line. The column is created after
specifying the Name of the column and type of column whether its string or
int. Here is the sample code for your clarification: A dataset and a
datatable is created and its binded to the datagrid.
---------------------------------- DataSet ds=new DataSet();
DataTable dt=new DataTable();
DataRow dr=dt.NewRow ();
DataColumn dc=new DataColumn();
dt.Columns.Add("name",typeof(String));
dt.Columns.Add( new DataColumn("age",typeof(int)));
dt.Rows.Add(dr);
dr[0]= "venkat";
dr[1]=20;
ds.Tables.Add(dt);
dataGrid1.DataSource=ds;
---------------------------------------------------
Regards,
Venkatesan Prabu. J
HCL Technolgies,
Chennai.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]