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 any folder or any container-object description (MDM repository, Time series database, Modeling container, Assembly, .NET assembly) should be specified. Navigation will be available by all children objects.

Fore Example

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

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    CombineFilter: IMetabaseDialogCombiFilter;
    Filter: IMetabaseDialogMetaclassFilter;
Begin
    MetabaseListView1.Root := MetabaseClass.Active.Root;
    
//Possibility of calling for the system context menu 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 the MDM dictionaries
    Filter := New MetabaseDialogMetaclassFilter.Create;
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.RDS_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Install filter for a component
    MetabaseListView1.Filters.AddFilter(CombineFilter);
End Sub Button1OnClick;

On clicking the button, the MetabaseListView1 component is set up. The root directory will be set for the component and the possibility 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 be also set: folders and various types of the 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. Instead of the Fore components use Fore.NET analogs.

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;
    
//Possibility of calling for the system context menu 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 the MDM dictionaries
    Filter := New MetabaseDialogMetaclassFilterClass();
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.RDS_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Install filter for a component
    MetabaseListViewNet1.Filters.AddFilter(CombineFilter);
End Sub;

See also:

IMetabaseListView