public DataTable FixupDataTable(DataTable myDataTable)
{
myDataTable.Columns.Add("Order Number", typeof(string));
myDataTable.Rows.ForEach(row =>
{
row["Order Number"] = string.Format(
"<!--{1}--><a href='/Order/Details?id={0}'>{1}</a>", row["Id"], row["OrderNumber"]);
});
myDataTable.Columns.Remove("OrderNumber");
myDataTable.Columns[myDataTable.Columns.Count - 1].SetOrdinal(0);
return myDataTable;
}
No comments:
Post a Comment