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

TcxCustomDataController.ForEachRow(Boolean,TcxDataControllerEachRowProc) Method

Calls a custom procedure for each row in a data controller.

#Declaration

Delphi
procedure ForEachRow(ASelectedRows: Boolean; AProc: TcxDataControllerEachRowProc); virtual;

#Parameters

Name Type
ASelectedRows Boolean
AProc TcxDataControllerEachRowProc

#Remarks

Call this method to iterate selected or all rows available in your data controller. Call a custom procedure (callback function) for each row. The ASelectedRows parameter specifies whether to process selected or all rows. The callback function is passed as the AProc parameter. The function prototype is determined by the TcxDataControllerEachRowProc type.

The ForEachRow method can be used in all loading modes (unbound, provider, bound, grid, and server modes). When iterating rows in grid mode, the ForEachRow method focuses a row and then calls the specified callback function. In other modes, focus is not affected by ForEachRow.

Use the RowCount property to determine the total number of rows. It takes into account data records and grouping rows which are visible or potentially visible by scrolling (i.e. not hidden in a collapsed group). You can use the MakeRecordVisible method first to make a particular record visible if it is hidden within a collapsed group.

See Also