CustomValidator inside Datagrid

F

Fernando Hunth

There are problems trying to implement cell by cell validation using the
grid's Validating event architecture. The problem is that the grid is not the
object handling the data. Instead, a TextBox or some other control is the
control managing the changing of the cell contents. One way to implement the
validation at the grid level is to handle the CurrentCellChanged event, and
if the previous cell's value is not proper, then return to that cell. You can
download a sample that implements this process. The sample only handles the
validation from cell to cell movement. If you want to handle the validation
when the user clicks on the forms Close button, then you would have to add a
special event handler for this and do one last validation at this point.

http://www.syncfusion.com/faq/winforms/Files/datagridvalidation.zip
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top