GridControl.ForceInitialize() Method
Forces the grid control to finish its initialization.
Namespace: DevExpress.XtraGrid
Assembly: DevExpress.XtraGrid.v17.2.dll
Declaration
Remarks
You must call the ForceInitialize method before changing grid options when a form is being loaded (for instance, when changing grid’s settings in the Form.Load event handler). After the grid control has been initialized, you can manipulate its settings safely. For instance, you should call the ForceInitialize method before:
- applying data grouping and/or sorting;
- changing summary settings;
- expanding and collapsing rows;
- creating columns and changing their visible state;
- restoring a layout, etc.
Note
Calling the ForceInitialize method before the form’ Load event occurs is not in effect. For instance, calling this method in the form’s constructor is not in effect.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ForceInitialize() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.