Hi, I'm doing my own validation on various cells, and I can't get the focus to stay on the invalid cell if the user tabs out of that cell.
This is what I'm doing:
On OnCurrentCellEditingComplete, I do my validation on the current cell. When the cell data is invalid, I want to stay focused on that cell and ideally BeginEdit on the same cell again.
How can I do this?
ADAdministrator Syncfusion Team August 19, 2003 01:52 PM
Instead of OnCurrentCellEditingComplete, use OnValidateCurrentCell instead. (Use CurrentCell.Renderer.ControlText to get the 'new' text value and do your validation on it.) If validation fails, set e.Cancel = true. You can also set CurrentCell.ErrorMessage if you want to display a message. Setting e.Cancel = true will force the currentcell to stay put.