How do I suppress the built-in validation in the UltraGrid for constraitns on DataTables (e.g. unique columns)? I need to allow the user to put in "invalid" data to a cell, but not leave the row. This means that I neither want to revert the value, nor keep the focus on that cell.
Also, I couldn't find any reference to the event model for validation in the online documentation. Does anyone know where I'd find this?
Hi,
By default, the gridwrites the contents of a cell to the underlying data source when the cell loses focus. So you won't be able to leave the cell in this case unless you change the grid's UpdateMode to something like OnRowChange or OnRowChangeOrLostFocus.This should allow the user to leave the cell, since the grid won't try to update the data source until they leave the row.
To handle errors in the grid, you can use the CellDataError event or the Error event (or possibly both). You would typically do any other validation in either the BeforeCellUpdate or BeforeRowUpdate events.
Mike,
That's one of the missing pieces! Thanks!
What I'm trying to do is provide our own custom validation through SetColumnError on the datatable used as the DataSource. What mechanism can I use to ensure that the user can't exit the row if there are errors? The UltraGrid doesn't seem to check for the presence of these errors by default.
Thanks in advance for your help.