public static DataTable AddRowNumber(DataTable dataTable)
{
dataTable.Columns.Add("RowNumber", typeof(int));
for (int i = 0; i < dataTable.Rows.Count; i++)
{
dataTable.Rows[i]["RowNumber"] = i;
}
dataTable.AcceptChanges();
return dataTable;
}
Tuesday, September 22, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment