Datagridview cellvalidating not working

Rated 3.86/5 based on 871 customer reviews

The only problem I am having at the moment is figuring out exactly which cell we're coming from (validating), since the currentcell is the cell we're moving to.

Value End If This SHOULD work, but I'm so busy at the moment I haven't tested it...

I know how we can do this, however, I just need to know how you bind your datagrid...

If you let me know, I'll write you a handler so that we can examine the value in your validating event, and if the date is not proper, we can examine the underlying datasource, and view the .

Sometimes when the user edits a cell then clicks the button, the Cell Validated event is called After the button event is called.

In this case the Button_Click event is called, which saves the data and clears the grid and apparently after the grid is cleared, then it calls Cell Validated.

datagridview cellvalidating not working-61

datagridview cellvalidating not working-32

While the error trace made it appear that the grid cell was not validating until after the button click event was finished.

OK, I got it working, but I'm not pleased with my solution.

I'm thinking that rather than trying to do this via Current Cell, etc., we should try using the underlying datasource instead.

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.

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).

Leave a Reply