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

Example: TcxCustomDataController.BeginLocate, TcxCustomDataController.EndLocate

The following code searches the record containing a specific value of the EmpNo field in the dataset displayed by a tvEmployee view of ExpressQuantumGrid. The TDataSet.Locate method used for searching is enclosed by the BeginLocate and EndLocate methods. It prevents the data controller from the full data reloading which usually occurs when using Locate.

AValue: Integer;
//...
  AValue := 71;
  with tvEmployee.DataController do
  begin
    BeginLocate;
    try
      DataSet.Locate('EmpNo', AValue, []);
    finally
      EndLocate;
    end;
  end;