Never mind. I figured it out.
Basically, I retrieve the grid's datasource into a datatable:
DataTable DT_tempTable = (DataTable)dataGrid_auditAddress.DataSource;
do a query of of the table and put the result in a datarow collection:
DataRow[] row_1 = DT_tempTable.Select("col_row = '" + iRowNum.ToString() +
"'");
row_1[0]["col_mark"] = MARKED; //in this case, it always returns one row
Unfortunately, this automatically updates the datagrid also (which takes
ages if processing large amounts of rows), so you need to deattach the grid
datasource, modify the datatable, and reattach once again.
"VM" <vo******@yahoo.com> wrote in message
news:Oc**************@TK2MSFTNGP10.phx.gbl...
How can I modify a row in a datatable in a Windows form? For example, I
want to find the row where 'emplcode' equas '000001' and once I find it, change
the 'name' to 'John'. Then put the updated row back to the table.
Thanks.