Skip to main content
A newer version of this page is available. .

GridControl.BeginUpdate() Method

Locks the GridControl object by preventing visual updates of the object and its elements until the EndUpdate method is called.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v17.2.dll

Declaration

public virtual void BeginUpdate()

Remarks

The BeginUpdate and GridControl.EndUpdate methods can be used to prevent excessive visual updates to the currently opened Views. After the BeginUpdate method has been called, the currently opened Views are locked, and do not reflect any changes made to their appearance settings. Calling the GridControl.EndUpdate method unlocks and redraws the Views.

To prevent excessive updates in a single View, use the BaseView.BeginUpdate and BaseView.EndUpdate methods.

The BeginUpdate and EndUpdate methods do not prevent grid updates caused by data-aware operations (for instance, adding and deleting records, sorting and grouping data). To prevent the grid from being updated in these instances, call the BaseView.BeginDataUpdate and BaseView.EndDataUpdate methods.

Note

Do not set the GridControl.MainView property while wrapping the setter with the GridControl.BeginUpdate and GridControl.EndUpdate method pair. Instead, set the GridControl.MainView property outside the BeginUpdate/EndUpdate block.

Refer to the Batch Modifications Overview topic, for information on batch modifications.

The following code snippets (auto-collected from DevExpress Examples) contain references to the BeginUpdate() 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.

See Also