What's going wrong:
When I edit a cell in a SpreadsheetGear WorkbookView, and initiate the CellEndEdit event by either hitting Enter, Tab, or any of the arrow keys, the value I just typed is wiped out.
Context:
- It seems that when editing a cell in a WorkbookView, a control is added on top of the WorkbookView that behaves like a TextEdit to allow you to type in your data. When the CellEndEdit event happens, the call stack indicates that the WorkbookView calls ControlCollection.Remove(...).
- This, in turn, causes the Form to give focus to another control on the page. The page in question includes some TextEdit controls above the WorkbookView that are inherited from a base page. The first TextEdit is given focus for a brief moment.
- Validation is set up on these TextEdits which ends up initiating a model update. This wipes out what is in the WorkbookView because all this happens before the change in view is pushed to the model.
Questions:
Is there a way to stop the other controls from receiving focus before my WorkbookViews event handlers can push the view's changes to the model? Or is there another way to handle this better?
Please let me know if I can elaborate anywhere or explain myself better, thanks!
Update:
I created a test application with one DevExpress TextEdit and one SpreadsheetGear WorkbookView. If I add textEdit1_Validated and textEdit1_Enter, I get the same behavior. The focus goes to the TextEdit control which now seems to be due to the validation handler.