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

TcxCustomGridTableOptionsBehavior.BestFitMaxRecordCount Property

Specifies the maximum number of records processed to calculate the best width for columns when calling ApplyBestFit.

#Declaration

Delphi
property BestFitMaxRecordCount: Integer read; write; default 0;

#Property Value

Type Default
Integer 0

#Remarks

Use the BestFitMaxRecordCount property to limit the number of records used to calculate the best width for columns when calling the ApplyBestFit method.

The ApplyBestFit method calculates the width of columns so that their contents are fully displayed within grid cells.

The default value (0) of the BestFitMaxRecordCount property indicates that all records are used to determine the best width. If the View displays a large amount of records, this operation can require much time. In order to speed up performance when the ApplyBestFit method is called, assign the required number of records to process to the BestFitMaxRecordCount property. In this case, the View processes the number of records determined by BestFitMaxRecordCount starting from the top visible record.

To make a View iterate only currently visible records, set BestFitMaxRecordCount to the value returned by the View’s ViewInfo.VisibleRecordCount property.

The default value of the BestFitMaxRecordCount property is 0.

See Also