Following is code snippet :
DataTable secondTable = new DataTable();
DataColumn col;
for (int I = 0; I < datasource.Rows.Count; I++)
{
col = new DataColumn("Col" + I.ToString(),
Type.GetType("System.String"));
secondTable.Columns.Add(col);
}
DataRow newRow;
for (int I = 0; I < datasource.Columns.Count; I++)
{
newRow = secondTable.NewRow();
for (int J = 0; J< datasource.Rows.Count; J++)
{
newRow[J] = datasource.Rows[J]
.ToString();
}
secondTable.Rows.Add(newRow);
}
HTH
eagle said:
That's an idea, although not sure how to do the second one. You mean
item
by item I would have to place into the 2nd table? Could you give me some
code or pseudo code examples?
I also want pagination, hence the reason I am sticking to a grid. Thanks
for you rhelp.