Author: Haribala Member Level: Bronze Member Rank: 408 Date: 20/Jun/2010 Rating:  Points: 4 |
Hi,
you can do simple way ,Just make a datatable and add column finally bind to grid.
DataTable dt = (DataTable)Session["DATASESSION"];
if ( dt == null ) {
dt = new DataTable("Table");
dt.Columns.Add("Col1");
dt.Columns.Add("Col2");
dt.Columns.Add("Col3");
dt.Columns.Add("Col4");
} dt.LoadDataRow(new object[]{inputcol1,inputcol2,.,.....});
Session["DATASESSION"] = dt;
Grid.DataSource = dt;
Grid.DataBind();
This is one way...
if you want to clarificatoin about grid ,pls find the url here
http://www.codeproject.com/KB/aspnet/dynamic_Columns_in_Grid.aspx
http://www.dotnetschool.com/Resources/ASP.Net/Sample%20Codes/Gridview-Operation.aspx
Thanks
Haribala
|