R
Rajeev
Hi
I can use the TableRow and TableCell class in C# while using Web
forms. The same are not available while programming with Windows
Forms. I have the folloowing code that works fine with Web forms but
returns error with Windows Forms. How can I make it run for Windows
forms:
TableRow r;
TableCell c;
for (j=0; j < colCount; j++)
{
r= new TableRow();
c = new TableCell();
c.Controls.Add(new LiteralControl(DS.Tables[0].Columns[j].ColumnName));
c.VerticalAlign = VerticalAlign.Top;
c.Style["background-color"] = "lightblue";
r.Cells.Add(c);
for (i = 0; i {
c = new TableCell();
c.Controls.Add(new LiteralControl(dataArray[j]));
c.VerticalAlign = VerticalAlign.Top;
r.Cells.Add(c);
}
Table1.Rows.Add(r);
}
}
I can use the TableRow and TableCell class in C# while using Web
forms. The same are not available while programming with Windows
Forms. I have the folloowing code that works fine with Web forms but
returns error with Windows Forms. How can I make it run for Windows
forms:
TableRow r;
TableCell c;
for (j=0; j < colCount; j++)
{
r= new TableRow();
c = new TableCell();
c.Controls.Add(new LiteralControl(DS.Tables[0].Columns[j].ColumnName));
c.VerticalAlign = VerticalAlign.Top;
c.Style["background-color"] = "lightblue";
r.Cells.Add(c);
for (i = 0; i {
c = new TableCell();
c.Controls.Add(new LiteralControl(dataArray[j]));
c.VerticalAlign = VerticalAlign.Top;
r.Cells.Add(c);
}
Table1.Rows.Add(r);
}
}