Skip to main content

DataControlBase.BeginDataUpdate() Method

Locks visual and internal data updates within the GridControl. Call the DataControlBase.EndDataUpdate() method to apply all pending changes and resume updates.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v22.1.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public void BeginDataUpdate()

Remarks

If you lock the GridControl, a user cannot change data within the control. You can accumulate changes and update data in one action. As a result, you can improve the performance of the GridControl during data shaping operations. Call the DataControlBase.EndDataUpdate() method to apply the pending changes.

A DataControlBase.EndDataUpdate() method call should follow every BeginDataUpdate() method call.

The TreeListView saves the current state of all nodes (selected or expanded) when you call the BeginDataUpdate() method and restores this state when you call DataControlBase.EndDataUpdate(). If properties bound to the state are changed during data updates (see IsCheckBoxEnabledBinding and ExpandStateBinding), you can save the changed state. To do that, call the TreeListView.SaveNodesState method before DataControlBase.EndDataUpdate().

The GridControl processes updates according to the data structure type in the TreeListView. Refer to the following topic for more information: Lock Updates.

See Also