IRdsDictionaryBox.RefreshElements

Syntax

RefreshElements;

Description

The RefreshElements method refreshes the element tree.

Example

Executing the example requires a form with the Button1 button, the RdsDictionaryBox component named RdsDictionaryBox1, and the UiRdsDictionary component that is a data source for RdsDictionaryBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    DictInst: IRdsDictionaryInstance;
    Elements: IRdsDictionaryElements;
    Data: IRdsDictionaryElementData;
Begin
    MB := MetabaseClass.Active;
    DictInst := RdsDictionaryBox1.Source.Instance;
    Elements := DictInst.Elements;
    Data := Elements.CreateElementData;
    Data.Value(0) := MB.GenerateKey;
    Data.Value(1) := Element  + Data.Value(0);
    Data.Value(2) := -2;
    Elements.Insert(-2, Data);
    RdsDictionaryBox1.RefreshElements;
End Sub Button1OnClick;

After executing the example an element is created in the MDM dictionary on pressing the button.

See also:

IRdsDictionaryBox