TcxCustomGridTableController.FocusedRecord Property
Refers to a record being focused within a View.
Declaration
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