Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Datagridview sorted and then updating wrong row programatically

$
0
0
I have a data grid view in VB, visual studio 12. When a user clicks on a line in my application I mark the row so I process it later (need this for multi-user). The grid loads from a table but it is not bound to it. When the user then clicks on a column header to sort it works fine (the sorting). Then when they change one of the cells (that was selected for the sort) the code I have which marks the row for saving/processing later is incorrectly marked. What's happening is the column is resorting when the user leaves the cell making my code mark the wrong row.  I use the CellLeave Event currently.  I couldn't find documentation which states when sorting occurs compared to the other events.  Anyone have an answer/suggestion?

Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>