BeginUpdate;
BeginUpdate();
The BeginUpdate method disables rerendering of linked components.
The method is relevant if it is called from the MetaAttributesBreadcrumb child component linked to the component MetaAttributesTreeList. Calling the method enables the user to avoid blinking of the MetaAttributesTreeList component on changing properties of the component MetaAttributesBreadcrumb.
To resume rerendering, use the EndUpdate method.
NOTE. The state of the component elements is saved at the method runtime.
Executing the example requires a form containing the MetaAttributesTreeList component named MetaAttributesTreeList1 and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. Components must be set to work with the same dictionary. Before executing the example two or more dictionary attributes must be selected in the MetaAttributesBreadcrumb1 component. The form should also contain the Button1 button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Items: IBreadcrumbItems;
Begin
MetaAttributesBreadcrumb1.BeginUpdate;
Items := MetaAttributesBreadcrumb1.Items;
Items.Move(0, 1);
MetaAttributesBreadcrumb1.EndUpdate;
End Sub Button1OnClick;
Clicking the button moves the first element in the MetaAttributesBreadcrumb1 component to the second position. Rerendering of the MetaAttributesTreeList1 component will pause during the swapping.
Executing the example requires a form containing the MetaAttributesTreeListNet component named MetaAttributesTreeListNet1 and the MetaAttributesBreadcrumbNet component named MetaAttributesBreadcrumbNet1. Components must be set to work with the same dictionary. Before executing the example two or more dictionary attributes must be selected in the metaAttributesBreadcrumbNet1 component. The form should also contain the Button1 button.
Imports Prognoz.Platform.Interop.Forms;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Items: IBreadcrumbItems;
Begin
metaAttributesBreadcrumbNet1.CtrlBox.BeginUpdate();
Items := metaAttributesBreadcrumbNet1.CtrlBox.Items;
Items.Move(0, 1);
metaAttributesBreadcrumbNet1.CtrlBox.EndUpdate();
End Sub;
Clicking the button moves the first element in the MetaAttributesBreadcrumbNet1 component to the second position. Rerendering of the MetaAttributesTreeListNet1 component will pause during the swapping.
See also: