Capturing deleted dataGrid Rows

rogerm

Member
Joined
Apr 6, 2007
Messages
15
Programming Experience
3-5
How can I capture deleted dataGrid Rows as soon as the Delete key is pressed?

Currently I am using the dataGrids .invalidate method (the only method that I can find that responds when the Delete key is depressed) to loop through the source dataSet. I use the rowState and if it is =rowStateDeleted then I rejectChanges so I can get the info from this row, make a new dataRow , and then add this row to another dataSet, and then I delete back the original row.

Works fine for the first dataGrid row selected but when multiple rows are selected it only recognizes the first as being rowStateDeleted.I am calling dataGrid.endInit() prior to doing the above.

Is there another way to get at this problem. Basicially I am transferring deleted rows in one dataGrid and imediately adding them to another dataGrid.
 
Back
Top