Access Root Logical Operator value

2 posts, 0 answers
  1. O
    O avatar
    3 posts
    Member since:
    Jan 2015

    Posted 10 Feb Link to this post

     

    How do you get access to the Root Logical Operator value? For example, I want to do this

     

                RadDataFilterDialog dialog = new RadDataFilterDialog();
                dialog.ShowDialog();
                //string expression = dialog.DataFilter.Expression;

                //Doesn't work
                DataFilterRootNode dfRn = dialog.DataFilter.Nodes[0] as DataFilterRootNode;
                if (dfRn != null)
                {
                    var rootLogicalOperator = dialog.DataFilter.Nodes[0].LogicalOperator;
                }

                //Doesn't work
                var rootLogicalOperator = dialog.DataFilter.Nodes[0].LogicalOperator;

     

    dialog.DataFilter.Nodes[0] in the debugger indicates it's of type DataFilterRootNode but if I try to cast to that type to access the LogicalOperator value it gives error Error    CS0122    'DataFilterRootNode' is inaccessible due to its protection level

     

    So how do I access the root LogicalOperator value?

  2. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 14 Feb Link to this post

    Hello,

    You can use the following code for this:
    RadDataFilterDialog dialog = new RadDataFilterDialog();
     
    dialog.DataSource = GetTable();
    dialog.ShowDialog();
     
    DataFilterGroupNode dfRn = dialog.DataFilter.Nodes[0] as DataFilterGroupNode;
    if (dfRn != null)
    {
        var rootLogicalOperator = dfRn.LogicalOperator;
    }

    The DataFilterRootNode class will be exposed in the next official release.

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top