Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!Hi there, I have a question regarding datagridview, I add data to the datagridview in an interface and all the validation for the datagridview cell is in the datagridview cell validating event for the datagridview.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???This tutorial is a basic introduction of how to write a simple data driven application using Visual Studio 2008 wizards without writing a single line of code.
However, you can block the move so the focus remains on the current control (cell) by setting the Cancel property to True on the Cancel Event Arg parameter.
And for the error message to display in the specific cell that the validation is done I have to click on another place for the error message to display.
How can I make it when the datagridview value cell value is selected and then the error message display and the cursor is focused in to the same cell. thnxxxxxx I must agree with you on how the Validation events operate.
Rows in the control are not automatically sorted when a cell value is changed.
The Data Grid View control available as a part of Windows Forms controls in Visual Studio 2008 is much more powerful than it's previous versions.