Skip to main content

TcxCustomGridTableOptionsBehavior.BestFitMaxRecordCount Property

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

Declaration

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