getting Filter programmatically server side

2 posts, 0 answers
  1. Jérome
    Jérome avatar
    11 posts
    Member since:
    Dec 2014

    Posted 19 Feb 2015 Link to this post

    Hello,

    I have implemented a page loading a pivotgrid from an xml file using Persistence Framework and it works fine.
    my pivotgrid use OLAP datasource.

    I would like to get the filter set for a specific dimension in the pivotgrid and display in a textbox the selected value for the filter, programmatically server side.

    I looked for documentation in the online documentation and in threads in this forum but didn't found anything about how to do this.

    is it possible to do this and how can I implement a solution?

    thanks in advance.

    regards
  2. Jérome
    Jérome avatar
    11 posts
    Member since:
    Dec 2014

    Posted 24 Feb 2015 in reply to Jérome Link to this post

    Hello,

    I have a solution. dirty but it works

    my example gets the selected year for the filter of my dimension "Year"

    string year = string.Empty;
                if (this.PivotGrid.Filters.Count > 0)
                {
                    var conditions = ((Telerik.Web.UI.PivotGrid.Core.Olap.OlapSetCondition)(((Telerik.Web.UI.PivotGrid.Core.Filtering.OlapLabelGroupFilter)(this.PivotGrid.Filters[0].GetDataEngineFilter())).Condition));
                    foreach (var item in conditions.Items.AsEnumerable())
                    {
                        year = item.ToString();
                        break;
                    }
                }
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top