IMetabaseListView.Root

Fore Syntax

Root: IMetabaseObjectDescriptor;

Fore.NET Syntax

Root: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;

Description

The Root property determines the root directory description, which contents is displayed in the component.

Comments

As the property value, specify any folder or any band object description (MDM repository, Time series database, Modeling container, Assembly, .NET assembly). Navigation will be available by all child objects.

Fore Example

Executing the example requires a form with the button named Button1 on it and the MetabaseListView component named MetabaseListView1. Add a link to the Metabase system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    CombineFilter: IMetabaseDialogCombiFilter;
    Filter: IMetabaseDialogMetaclassFilter;
Begin
    MetabaseListView1.Root := MetabaseClass.Active.Root;
    
//Ability to call system context menu for objects
    MetabaseListView1.EnableSystemPopupMenu := True;
    
//Display the Find All button
    MetabaseListView1.EnableFindAll := True;
    CombineFilter := 
New MetabaseDialogCombiFilter.Create;
    
//Filter to display folders
    Filter := New MetabaseDialogMetaclassFilter.Create;
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.FOLDER_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Filter to display various types of MDM dictionaries
    Filter := New MetabaseDialogMetaclassFilter.Create;
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.RDS_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Set filter for component
    MetabaseListView1.Filters.AddFilter(CombineFilter);
End Sub Button1OnClick;

Clicking the button sets up the MetabaseListView1 component. The root directory will be set for the component and the ability to call system context menu for repository objects will be enabled. The Find All button will be available in the search dialog box. The object filter will also be set: folders and various types of MDM dictionaries will be displayed in the component.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Metabase;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    CombineFilter: IMetabaseDialogCombiFilter = 
New MetabaseDialogCombiFilterClass();
    Filter: IMetabaseDialogMetaclassFilter;
Begin
    MetabaseListViewNet1.Root := Self.Metabase.Root;
    
//Ability to call system context menu for objects
    MetabaseListViewNet1.EnableSystemPopupMenu := True;
    
//Display the Find All button
    MetabaseListViewNet1.EnableFindAll := True;
    
//Filter to display folders
    Filter := New MetabaseDialogMetaclassFilterClass();
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.FOLDER_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Filter to display various types of MDM dictionaries
    Filter := New MetabaseDialogMetaclassFilterClass();
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.RDS_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Set filter for component
    MetabaseListViewNet1.Filters.AddFilter(CombineFilter);
End Sub;

See also:

IMetabaseListView