Ticket T1280024
Visible to All Users

Iterate through ALL FilteredRecords if GridMode = true

created 5 days ago (modified 5 days ago)

Hi,

I have a cxGridDBTableView with GridMode = true. I want to iterate through ALL FilteredRecords. I'm using this code:

Delphi
var ADataController: TcxGridDBDataController; I: Integer; begin ADataController := cxGrid1DBTableView1.DataController; for I := 0; to ADataController.FilteredRecordCount - 1 do cxMemo1.Lines.Add(ADataController.DisplayTexts[ADataController.FilteredRecordIndex[I], 0]); end;

I have about 1000 records, but FilteredRecordCount is ALWAYS 63 (=GridModeBufferCount?!). How to use ALL FilteredRecords?

Answers approved by DevExpress Support

created 2 days ago

Hello,

This behavior is expected. When Grid uses the grid mode, the data controller loads a fixed number of dataset records based on your conditions. If you wish to get all records that match your filter (not only those that are loaded currently), I recommend you iterate through your records at the database level.
If it does not meet your requirements, please describe your task in greater detail. What do you need to do with these records after that?

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.