Filter Window not sorting

6 posts, 0 answers
  1. Adriaan
    Adriaan avatar
    4 posts
    Member since:
    Feb 2014

    Posted 03 Sep 2014 Link to this post

    I have tried setting the property for the filter window to sort the setbox here for the pivot grid

    FilterWindow-SetBox-Sort="Ascending" 

    Have also tried sorting from code behind (which does seem to sort the items) and then update the setbox but no matter what I try the items in the setbox list are always completely unsorted. I tried putting this code in multiple events but something must be firing after the fact to unsort the values or sort them based on groups. I want a clean alphabetical sort for all items in the list. Thanks

    RadPivotGrid1.FilterWindow.SetBox.Sort = RadListBoxSort.Ascending;
    RadPivotGrid1.FilterWindow.SetBox.SortItems();
    RadPivotGrid1.FilterWindow.SetBox.DataBind();
  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1803 posts

    Posted 08 Sep 2014 Link to this post

    Hello Adriaan,

    Changing the sort order and calling the SortItems() method will have an effect only after the RadListBox control have its items available. Since those items are internally created and added to the Items collection of the RadListBox by the RadPivotGrid, the proper event for sorting the items will be the server-side OnPreRender event:
    protected void RadPivotGrid1_PreRender(object sender, EventArgs e)
    {
        RadPivotGrid1.FilterWindow.SetBox.Sort = RadListBoxSort.Descending;
        RadPivotGrid1.FilterWindow.SetBox.SortItems();
    }

    Additionally, you do not have to call the DataBind() method after calling the SortItems() method.

    Please let me know if the above works on your end too.


    Regards,
    Konstantin Dikov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Adriaan
    Adriaan avatar
    4 posts
    Member since:
    Feb 2014

    Posted 02 Oct 2014 in reply to Konstantin Dikov Link to this post

    Hello, I thought this worked (and had marked this as answered) - and it does in fact sort the list - however, after this change when you attempt to change a column filter it causes this error:

    Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Value cannot be null.
    Parameter name: typeName 

    When I remove this code the filtering works fine again but of course no sorting. Thanks
  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1803 posts

    Posted 07 Oct 2014 Link to this post

    Hello Adriaan,

    Thank you for getting back to us.

    I have tested the filtering after applying the suggested change and indeed, a server-side error occurs. It seems that for some reason, sorting the FilterWindow items will cause an issue with the internal logic of the RadPivotGrid

    I will forward this to our developers team, so they could further investigate it and determine whether this is a bug with the control or a limitation with the current implementation.

    Currently, the only thing that I could suggest is that you remove the sorting logic.

    Please excuse us for any inconvenience caused by this.


    Regards,
    Konstantin Dikov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Grant
    Grant avatar
    8 posts
    Member since:
    Aug 2011

    Posted 20 Jun in reply to Konstantin Dikov Link to this post

    Hello,

    I have seen this forum post from 2014 and was wondering if there is a recent solution to this.

    I would also like to be able to sort the "All Fields" box in the configuration panel. Is this possible without messing up the pivot grid logic?

    Thanks

  7. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1803 posts

    Posted 23 Jun Link to this post

    Hi Grant,

    Regarding the FilterWindow fields, there is still no option for changing the sort order to descending. As for the fields in the configuration panel, those fields could not be sorted. You could however create an item in our Ideas & Feedback Portal and if it receives enough votes, our developers team will consider its integration:

    Best Regards,
    Konstantin Dikov
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017