|
-
Oct 11th, 2021, 11:43 AM
#1
DGV Error Providing Ideas
I now have a DataGridView that has a bit of validation on it. I don't think I have ever used a DGV in this fashion, so I've gotten to learn a few things. One of the things I've learned is that validation and providing feedback for the users is a bit fiddly and open ended. At this point, I am using a modified variation on this SO approach:
https://stackoverflow.com/questions/...r-datagridview
I shifted things around a bit, and it is working fine, as far as I can tell, but it's perhaps not ideal for a couple reasons, and I would think people might have other ideas that they prefer. By using my variation on that thread, I get an error icon on the right side of the cell, and the user can't move out of the cell. That's pretty fair feedback. The icon oddly flickers, at times, and I haven't quite figured out why (it almost certainly has to do with where the mouse is located), but it's good enough that I'm not overly concerned about it.
However, I also have a means to flood fill the columns in the DGV. This will fill all the cells in a column with the same value. I can't think of a scenario where errors will arise from doing this, because the flood fill does it's own validation prior to putting anything in the cell, but if I'm wrong about that, it seems like there would be an odd failure mode, as one value would update, that would get rejected by the validating, and the loop that was flood filling would freeze. I would expect this would lock up the interface.
Again, I don't think this is possible, but it suggests that some other form of validating might make more sense.
So, I was wondering what methods people have used for validating DGV cell contents, and providing feedback to the user? I'm looking for better ideas than the one I'm using.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|