DataQueryBase TQuery  ForEachPage Method Kentico 8.1 API Reference
Executes the given action for each page (DataSet) in the results. If the query is not set up as a paged query before calling this method and pageSize is not set, executes the action once with the current results.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 8.0.0.0 (8.1.5347.20411)

Parameters

pageAction
Type: OnlineSystem Action TQuery 
Action which will be executed for each page
pageSize (Optional)
Type: OnlineSystem Int32
Page size. 0 means no processing page-by-page. By default uses current paging settings. Page size of the query is set to the original value after this method finishes.
See Also