9. Outside edit
Second edit cell outside the grid and cell showing focus
Outside edit cell
The cell is named "EDIT" and is defined in Topbar.
-
Its main definition attributes are:
EDITOnClick="AcceptEdit,StartEditCell,1" to start editing without removing focus from other cell.
EDITEdit="{OnChange:EditChanged}" to call custom API method EditChanged whenever the EDIT changes during editing to mirror the changes to the source cells.
The source cells have assigned in column <D Name="Auto" Edit="{OnChange:CellChanged}"/> similar action to mirror the changes to the EDIT during editing source cells.
-
The mirroring values is done by API:
API event OnFocus mirrors the focused cell to the EDIT whenever the focus moves to another cells.
And also mirrors the EDIT cell to focused cell if the editing was accepted by click to another cell.
API event OnBlur clears the EDIT if the grid loses focus. Here it is used because of <Cfg StaticCursor='1'/>.
API event OnEndEdit saves the changed EDIT value to mirrored cell. And also restores original value in mirrored cell when editing was canceled.
API event OnStartEdit stores original value to use in OnEndEdit if the editing was canceled.
API event OnFindType preserves the type in EDIT cell to be always Lines.
-
The EDIT cell can be resized by setting EDITResizing="1" in the EDIT definition.
API event OnRowResize updates the row heights for correct EDIT resizing. It is used to not resize the EDIT height according to its content to not move the whole grid down for higher cells.
Actual focus cell
The cell is named "FOCUS" and is defined in Topbar.
-
Its main definition attribute is: FOCUSOnClick="AcceptEdit,StartEditCell,1" to start editing without removing focus from other cell.
-
Its functionality is done by API:
API event OnFocus shows actual focused cell and range in the FOCUS cell value.
API event OnEndEdit focuses the cell or cell range entered in the FOCUS cell.