Hi,
I have a datagridview that is filled with data from a DB.
When i delete a row by pressing the delete button, the row is deleted.
But when i loop through the rows that are in the datagridview, the deleted rows keep showing up in the collection of teh datagrid.
I want to first delete some rows from the datagridview and do an update from the DB after a check if the deleted rows can be deleted.
When i add some rows, there is no problem. the added rows are in the collection of the dataGrid.
1) when i have 4 rows and delete 2 rows the rowcount remains 4.
2) When i have 4 rows and add 2 rows the rowcount coms to 6.
Kind regards
Dipke
Loading
Abhay ShankerPosted Jan 30, 2014, 11:34 PM
SUNIL GUTTAPosted Jan 30, 2014, 2:22 PM
I guess you are deleting in gridview later not updating back to DB using Commandbuilder class or watever .. & ur add rows may be working may be you used dataReader for this .. Once keep multiple break point using F9 and debug you can find the root cause ..
by F11 analyse each step .
----------------- ----Return a favor of marking answer as useful-----------------------------