From RAD Studio API Documentation
Jump to: navigation, search


property OnColExit: TNotifyEvent read FOnColExit write FOnColExit;


__property System::Classes::TNotifyEvent OnColExit = {read=FOnColExit, write=FOnColExit};


Type Visibility Source Unit Parent
event protected
Vcl.DBGrids TCustomDBGrid


Occurs just before a cell in the grid loses input focus.

Write an OnColExit event handler to take specific action when a cell is about to lose focus. For example, use OnColExit to post edits to the underlying dataset when the user leaves a cell, rather than waiting for the user to leave the record.

A cell loses focus when

The user navigates out of the cell using the keyboard. For example, when the user presses the Tab key or the Home key.

The user clicks the mouse button down in another cell.

The SelectedField or SelectedIndex property is set.

When the selected cell in the data-aware grid changes, first the OnColExit event occurs. Then the values of SelectedField and SelectedIndex are updated. Finally the OnColEnter event occurs. Thus, in an OnColExit event handler, the SelectedField or SelectedIndex property can be used to determine which column is about to lose focus.

See Also