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

TcxCustomGridTableController.FocusedRecord Property

Refers to a record being focused within a View.

#Declaration

Delphi
property FocusedRecord: TcxCustomGridRecord read; write;

#Property Value

Type
TcxCustomGridRecord

#Remarks

You can use the FocusedRecord property to access the record being focused within the current View. FocusedRecord represents a TcxCustomGridRecord object which is the base class for all record types in ExpressQuatumGrid: data rows, master data rows, group rows, cards. Refer to the Records section to learn more about this.

The Focused/Selected Records document provides more information.

The following example checks whether a group row is focused. If so, it is expanded and the first data row under the group row is focused.

var
  AView: TcxCustomGridTableView;
//...
  AView := TcxCustomGridTableView(Grid.FocusedView);
  with AView.Controller do
    if FocusedRecord is TcxGridGroupRow then
    begin
      FocusedRecord.Expand(True);
      FocusedRecordIndex := FocusedRecordIndex +
        AView.GroupedItemCount - FocusedRecord.Level;
    end;
See Also