The application includes a datagridview GUI for .NET control that loads a large number of rows into the datagridview. The number of rows was large enough that the application implemented batching to allow the user to start seeing rows, in the view, even before all rows had been loaded into the view.
To allow all of the data in a column to be viewed, the datagridview's AutoSizeColumnMode was set to AllCells. This caused a sizable delay in data being displayed, to the point where the application appeared to be in a loop.
Assume a datagridview as follows:
DEFINE PRIVATE VARIABLE datagridview1 AS System.Forms.DataGridView NO-UNDO.
THIS-OBJECT:datagridview1 = NEW System.Windows.Forms.DataGridView().
To set this attribute the following code might be used:
datagridview1:AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode:AllCells.