This is a migrated thread and some comments may be shown as answers.

Filter Window not sorting

5 Answers 28 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Adriaan
Top achievements
Rank 1
Adriaan asked on 04 Sep 2014, 12:44 AM
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();

5 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 08 Sep 2014, 11:01 AM
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.

 
0
Adriaan
Top achievements
Rank 1
answered on 02 Oct 2014, 11:04 PM
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
0
Konstantin Dikov
Telerik team
answered on 07 Oct 2014, 11:49 AM
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.

 
0
Ian
Top achievements
Rank 1
answered on 20 Jun 2016, 10:31 PM

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

0
Konstantin Dikov
Telerik team
answered on 23 Jun 2016, 01:53 PM
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.
Tags
PivotGrid
Asked by
Adriaan
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Adriaan
Top achievements
Rank 1
Ian
Top achievements
Rank 1
Share this question
or