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.
"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." yeah i think it is because of the line you have said above how can i avoid this situation???
Add a Numeric Up Down Cell named "Age" to the Multi Row controls template.
Add the event handle of this event and copy the following code into the event handler.
I display the data of the is datagridview in another interface and make the cells read-only. But the thing is when I click on a row that data was added previously and press the Add new row the cell validating event is triggered.
How can I disable the cell validating event for the rows that was added before???When this event is canceled in data bound mode, the new value is not pushed to the underlying data source.When this event is canceled in virtual mode, the Cell Value Pushed event is not raised.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.thanxxxxxxxxxxx If you have attached an event handler to the Cell Validating event then it will always fire when focus leaves the cell.