G
Guest
After querying a data table into a DataRow array using DataTable.Select()
method, is there any way of updating the table with changes made to the
DataRow array?
In this example, rows in the original data table do not change even when I
change column values in the datarow array itself.
Also, the following code creates an untyped data row array. Is it possible
to create a datarow array that's strongly typed based on the strongly typed
datatable it's selected from?
Thanks in advance,
Andre Ranieri
DataRow[] r = Class1.myDS.Categories.Select("", "CatOrder");
for (int i =0; i < r.Length; i++)
{
lvCategories.Items.Add(r["Category"].ToString().Trim());
r["CatOrder"] = iCounter;
iCounter++;
}
Class1.myDS.AcceptChanges();
method, is there any way of updating the table with changes made to the
DataRow array?
In this example, rows in the original data table do not change even when I
change column values in the datarow array itself.
Also, the following code creates an untyped data row array. Is it possible
to create a datarow array that's strongly typed based on the strongly typed
datatable it's selected from?
Thanks in advance,
Andre Ranieri
DataRow[] r = Class1.myDS.Categories.Select("", "CatOrder");
for (int i =0; i < r.Length; i++)
{
lvCategories.Items.Add(r["Category"].ToString().Trim());
r["CatOrder"] = iCounter;
iCounter++;
}
Class1.myDS.AcceptChanges();