Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomGridTableView.OnSelectionChanged Event

In This Article

Occurs after moving the selection to another grid record or column (its cells).

#Declaration

Delphi
property OnSelectionChanged: TcxGridCustomTableViewEvent read; write;

#Remarks

Use the OnSelectionChanged event handler to process selection changing within the current View. The Sender parameter identifies the View where selection changes. A user can access all the selected records and columns via the View.Controller.SelectedRecords and View.Controller.SelectedColumns. This event occurs even for records for which selection is disabled via the OnCanSelectRecord event handler.

Note

Keep in mind the difference between selected and focused records. There can be only one focused record within a View at any time. If the View.OptionsSelection.MultiSelect option is deactivated, then the focused record is the selected record. In this case, the OnSelectionChanged event is not raised. You need to handle the OnFocusedRecordChanged event instead. If the View.OptionsSelection.MultiSelect option is active, then a View may not contain selections at all or, conversely, several records can be selected. Set the View.OptionsSelection.CellMultiSelect property to True to enable the cell (column) selection within a (Banded) Table View.

See Also