DataGrid Edit issue

  • Thread starter Thread starter andrewcw
  • Start date Start date
A

andrewcw

I have a DataGrid called QCDG. ALthough I am using C# I
think object exposure is identical & there's a lot of grid
expertise in the vb.net group. I am using WINFORM.

To change the a cell's data I did this:
[ but although I change the DataRow's element
the change is NOT reflected in the Table. I belive I am
making this much more difficult.

Thanks for you help !!!

QCDG.DataSource=qcLoaderTable;
System.Data.DataRow myDR=qcLoaderTable.Rows[0];
object[] oArray= myDR.ItemArray;
oArray[6]="FAIL";
string celval = (string)oArray[6];
QCDG.Refresh(); // see if the change is in the datatable
System.Data.DataRow myDRUP=qcLoaderTable.Rows[0];
oArray= myDRUP.ItemArray;
celval = (string)oArray[6]; // IT IS NOT !! ?? WHY ?
 
I think I solved my issue. Very simply :

QCDG[0,6]="FAIL"; where 0 = row, 6 = column;

Thanks
 
Back
Top