Problem with DataGridView and Cancelling NEW ROW entry after messup

A

aasif

Hi,

I have a DGV and I go to the NEW_ROW and start editing in there ( I
only have 1 COLUMN), I enter a value, and try and take focus off the
CELL by going to another control on the form or another CELL. The
CELL_VALIDATING event kicks in and Says DATA = BAD so it does'nt let
focus shift. So I decide I don't want that NEW_ROW anyway and want it
gone, so I press ESC and wish it disappeared but it does'nt.

Please if someone could tell me how I can... (After the cell has failed
validation and the little error icon is showing, and the focus cannot
shift)... press ESC and make the NEW_ROW disappear, after all I havent
saved it yet.

I have been trying to work this out for ages, please help me!

Thank You
Asif
 
A

aasif

Hi all,

No worries, I think the problem is solved, I read somewhere that
CellLeave runs before CellValidate, this has helped me, should be no
problems now.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top