Hi
Pyla,
Please do the following:
1. set AutoColumn=True in your datagrid
2. create columns based on your logic like
DataTable dt = new DataTable();
for (int c = 1; c <= 10; c++)
{
DataColumn dc = new DataColumn("Column" + c.ToString(), System.Type.GetType("System.String"));
dt.Columns.Add(dc);
}
GridView1.Datasource = dt;
GridView1.DataBind();
Please do let me know, if you have any doubt.
Please provide
Vote if this would be helpful to you.
Thanks,
Imdadhusen