Hi Puroshottam,

To create the columns in a table dynamically, you will have to use TableHeaderCell, TableHeaderRow, TableCell and TableHeaderCell classes. As in the following code I have created 2 rows with 2 columns dynamically. To put the cells at the specified location you can use AddAt method.

TableHeaderCell hcell1 = new TableHeaderCell();

hcell1.Text = "Column1";

TableHeaderCell hcell2 = new TableHeaderCell();

hcell2.Text = "Column2";

TableHeaderRow headerrow = new TableHeaderRow();

headerrow.Cells.AddAt(0, hcell1);

headerrow.Cells.AddAt(1, hcell2);

Table1.Rows.Add(headerrow);

TableCell cell1 = new TableCell();

cell1.Text = "Value1";

TableCell cell2 = new TableCell();

cell2.Text = "Value2";

TableRow row = new TableRow();

row.Cells.AddAt(0, cell1);

row.Cells.AddAt(1, cell2);

Table1.Rows.Add(row);

Hope this help.