Cellvalidating not

Ticks --------------------------------------------------Bluto: What? Boon: Forget it, he's rolling.-------------------------------------------------- Well... Google and MSDN haven't been able to produce much that works. Data Grid View Cell Validating Event Args) Handles dg Checks. Formatted Value --------------------------------------------------Bluto: What? When is the cell validated event suppose to be fired I have a simple form with a Data View Grid and a button (among other things).Sometimes when the user edits a cell then clicks the button, the Cell Validated event is called After the button event is called.The really strange thing is that when Cell Validated is called, Data Grid View. Count gives a value I would expect (greater than 0), but if you try to access any of the cells it throws an 'Object reference not set'.It seems like Cell Validated is being called in the middle of Rows.

I wrote code in the cellvalidating event as follows. Data Grid View Cell Validating Eve nt Args) Handles Datagrid1. While the error trace made it appear that the grid cell was not validating until after the button click event was finished.In reality the the cell validated when it was suppose to, AND when Rows. In other words it was called twice, and the 2nd time it was called when the grid was in an undetermined state where Rows. Annoying, and I can't think of any good reason for validation events to be called in the middle of Clear, especially when things are half cleaned up. I need to check that only one of the two can be checked. Its just that my UI does not respond correctly and I can't expect my users to get out of it that way. Bob "Bob" In a datagridview (vs2005, VB.net) I have two columns that are checkboxes.

Leave a Reply