Contents - Index - Previous - Next


DisableControls method



Applies to
TProfGrid component

Declaration
function DisableControls: Integer;

Description

Disables update of the grid's screen image and automatic adjusting of row heights.

Tip:  Calls to DisableControls can safely be nested. The return value of the method is the new value of an internal disable count variable.


Example

The most efficient code to load a large amount of rows in a loop is:

ProfGrid1.DisableControls;
ProfGrid1.SpreadsheetEnabled := False;
{ load records here... }
ProfGrid1.SpreadsheetEnabled := True;  // if you need it to be enabled
ProfGrid1.EnableControls;