VGridControlBase.BeginDataUpdate() Method

Prevents visual updates and data from being reloaded until the VGridControlBase.EndDataUpdate method is called.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll

Declaration

public virtual void BeginDataUpdate()
Public Overridable Sub BeginDataUpdate

Remarks

If a sequence of actions which affect the control's appearance need to be performed, the code should be enclosed between calls to the VGridControlBase.BeginUpdate and VGridControlBase.EndUpdate methods. These methods lock the control so that visual updates don't occur when multiple changes are performed in sequence.

However, in specific instances, you may need to perform a sequence of actions on the control's data source (for instance, add, delete or modify records). By default, the grid control reloads data when performing any of these operations. To prevent excessive updates when performing a sequence of data source changing operations, use the BeginDataUpdate and VGridControlBase.EndDataUpdate methods. Wrap the customization code with these methods. As a result, the control will reload data only once, after all modifications have been done, by the EndDataUpdate method.

The BeginDataUpdate and EndDataUpdate methods call the BaseView.BeginUpdate and BaseView.EndUpdate methods internally to prevent the control from being updated visually.

See Also