Datagridview cellvalidating enter emerson college campus in east sussex uk
thankxxxxxx There are two ways to manage unwanted execution of event handlers.1) Add a conditional statement in the event handler code to only execute when required.
Since you have not added your new row yet it should validate OK." yeah i think it is because of the line you have said above how can i avoid this situation???
Something there is causing the cell validating event to fire. [Edit] The validating event is firing because focus is being moved from the DGV to the button.
Since you have not added your new row yet it should validate OK.
thanxxxxxxxxxxx If you have attached an event handler to the Cell Validating event then it will always fire when focus leaves the cell.
If there are cells that you dont want to validate (eg read only cells) then add a check at the start of the event handler that will cause it to exit if it is trying to validate those cells.