| NavigateOptions property |
Applies to
TIB_CustomGrid
Declaration
Property NavigateOptions : TIB_Grid_NavOptions;
Description
The property allows you to change some of the key-stroke and navigation
behaviour for the grid. The options can be used individually or together to
achieve the desired grid behaviour.
gnF2Edits - when true, F2 will not only make the current cell
editable (EditorMode := true), it will also set the grid datasource to
dssEdit state.
gnF2Posts - when true and the grid datasource is in an editing state
then pressing F2 will attempt to Post the current row and turn the cell
EditorMode to false.
gnF2ToggleEditor - when true, F2 will toggle the state of
AlwaysShowEditor, changing the EditorMode for all cells instead of just the
current cell. If gnF2Edits or gnF2Posts are also set to true, then the
AlwaysShowEditor state will following the Editing status of the DataLink.
gnBrowseAlwaysNavigate - when true and the grid datasource is not in
and editing state the standard navigation keys (left/right/up/down etc) will
be used to navigate the grid, even when a grid edit control has focus (such
as TIB_ComboBox or the inplace editor if AlwaysShowEditor is true).
Without this, the only to navigate over these controls when they are focused
is with the Tab/Shift-Tab keys - which may have problems if TabMovesOut is
true.
gnCtrlNavigate - this is similar to gnBrowseAlwaysNavigate except that
this option causes the grid to intercept Ctrl+[navigate] (left/right/up/down
etc) keys going to a grid edit control, passing these navigate key strokes
to the grid to permit navigation around the grid regardless of the datasource
or grid state. Note: The ssCtrl flag is removed from before passing to the
grid (so that it will navigate instead of just slide the grid). If ssShift
is also provided then the ssCtrl flag will be passed to the grid.
gnOnEditDoEditClick - If this option is enabled then when the user
activates an InplaceEditor that would normally display an edit button, then the
grid will simulate a click of the edit button.
This means that, if you have AlwaysShowEditor=true, then when you tab
through the grid the edit buttons will be automatically clicked (presumably
displaying a dialog such as the default memo editor). For this reason you
may want to combine the selection of this option with gnMemoEditTabExits.
gnMemoEditTabExits - This option alters the default grid memo editor.
When set to true, if a user hits Tab in the memo editor it will return a
modal result of mrYes (instead of mrOk). The grid uses this as an indication
that it should tab to the next cell. If a user hits Shift+Tab then the
memo editor will return mrNo, in which case the grid will tab to the previous
cell. If this option is not enabled then the user must exit the dialog
by clicking the OK button (or pressing Enter) which returns mrOk, or by
pressing Escape which returns mrCancel.
Notes:
You will probably NOT want to use gnF2Posts if any column uses the
standard grid InplaceEdit control (ie. only this use when all columns have
a special dropped in edit control). This is because you will need the F2 key
to enable edit of the InplaceEdit even when AlwaysShowEditor is true.