1. Hmm, this still totally fails for me (I’m running 2.3.7326.14130). If I don’t add my own editor to the cell; I can start typing while NOT in edit mode and it will automatically enter edit mode and over write the cell contents with what I type. When I use a standard TextBox (or my custom control):
I must activate the edit mode by clicking into the cell, or causing an event that fires the enteredit on the cell/row.
Just to verify it wasn’t my application; If you take your “RichCellEditors” C# sample application run it, just start typing in the top “Simple Textbox” it will automatically overwrite when you start typing. Quit, goto the “RichCellEditors.cs” file into the “CreateTextBoxes” routine and make the following minor changes:
dataRow.Cells[“Editors”].CellEditorManager = new TextEditor();
TextBox TextEditBox = new TextBox();
TextEditor = new Xceed.Grid.Editors.CellEditorManager(TextEditBox, “Text”, true, true);
dataRow.Cells[“Editors”].CellEditorManager = TextEditor;
Then try just typing in the cell and you will see it does not “Auto-enter” edit mode. You can start the edit mode by clicking in it or hitting F2 after tabbing to it.
Out of curiosity does it matter if I use the “Columns” CellEditorManager or the the DataRowTemplate.Cells.CellEditorManager — I tried both ways and it didn’t make a difference. Just my code uses the Columns method for other things. (Any speed difference also, because I can adapt my code to use the DataRowTemplate.Cells method if their is a speed difference)
2. No, that only catches if I’m leaving “edit” mode on a cell. It is actually easier for my purposes to catch the “CellValueChanged” event on the grid in this specific case, as CurrentRow/CurrentCell will still be pointing to the cell that caused the event.
What I want is say I am tabbing between cells (not in edit mode) I want to be able to fire the event “before” I have left the cell (like OnLeave in a normal field). For instance the “CurrentCellChanged” has the new currentcell. I would like a “BeforeCurrentCellChanged” that get ran so that “CurrentRow” & “CurrentCell” variables of the Grid still point to the proper cell/row of the cell that is LOSING the FOCUS.
3. Thanks, that looks like that will work!
Would you rather I open Support issues for the above two issues; I personally like doing my support via forums so that my customers can see the resolution of them — but I need to get an answer soon on these issues. Or any work around you can come up with.
The only work around that I can think of is to put the cells into edit mode automatically — but when I tried it I get weird other artifacts when refreshing, and trying to make sure it is in edit mode at all times. Is their any easy way to make it default to being in edit mode when the grid is entered, and when they hit “Enter”/”Esc” which exits edit mode to put it back into edit mode?
Imported from legacy forums. Posted by Nathanael (had 392 views)