PivotGrid filtering not working

2 posts, 0 answers
  1. Hayley
    Hayley avatar
    5 posts
    Member since:
    Sep 2008

    Posted 15 Oct 2015 Link to this post

    When we try and filter on a field in our PivotGrid it does not show any labels in the items list (just the "Select All" option). Additionally if we try and apply a specific label filter (eg. "Contains") it does not return any data even though such data does exists.

    Also, is there a way to apply a filter before you perform a layout update? Our cube is quite large so updating the layout without first applying a filter often causes timeouts.

     Thanks!

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 19 Oct 2015 Link to this post

    Hi Hayley,

    I tested the online demo below and was not able to isolate the problematic behavior on my end.
    http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/olap/defaultcs.aspx

    Test it on your end and verify if it helps.

    As for the second question possible approach in your case is to apply initial filter by using the FilterByLabel and FilterByValue methods of the RadPivotGrid in the PreRender event.

    For example:

    FilterBylabel:

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByLabel(PivotGridFilterFunction.Contains, RadPivotGrid1.Fields["Cost"], "filter value");
    }

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByLabel(PivotGridFilterFunction.IsNotBetween, RadPivotGrid1.Fields["Cost"], "filter value", "beetween filter value");
    }

    FilterByValue:

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByValue(PivotGridFilterFunction.BeginsWith,
            RadPivotGrid1.Fields["Line"],
            RadPivotGrid1.Fields["Total"] as PivotGridAggregateField,
            "filter value");
    }

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByValue(PivotGridFilterFunction.IsBetween,
            RadPivotGrid1.Fields["Line"],
            RadPivotGrid1.Fields["Total"] as PivotGridAggregateField,
            "filter value",
            "between filter value");
    }


    Regards,
    Maria Ilieva
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top