Filtering; sorting of filter options, and missing label filter option

4 posts, 0 answers
  1. Derek
    Derek avatar
    118 posts
    Member since:
    Oct 2008

    Posted 30 Sep 2013 Link to this post

    (1) In a PivotGrid, is it possible to have the values sorted when filtering? If we display a list of values, from which to select, the values are unordered. If the number of values is lengthy, it's very cumbersome for the users to scroll through and find specific values since they have to look at every one.

    Is it possible to have the list of potential values returned in sorted order?

    (2) Why is it that the 'Label Filter' and 'Value Filter' only show up for certain columns? The user would like to use a substring search on one column, but the filtering options don't show anything other than the checkbox list.
  2. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 03 Oct 2013 Link to this post

    Hi Derek,

    As you could see at the following live example, which demonstrates the filter functionality, you could use the sort feature as well. Additional information could be found under Related Resources tab.


    Regards,
    Kostadin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ryan
    Ryan avatar
    5 posts
    Member since:
    May 2012

    Posted 05 Nov 2013 Link to this post

    Looking at the demo and the related resources, the sort order property simply controls how the value display in the Pivot Grid. However it does not control the Filter Window values. How can the values (labels) within the Filter Window be sorted?
  5. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 08 Nov 2013 Link to this post

    Hi Ryan,

    I am afraid that this could not be achieved out of the box. Nevertheless a possible solution is to manually find the ListBox control inside the Window. Please check out the following code snippet which demonstrates how to get the ListBox control.
    <script type="text/javascript">
     
                function PivoGridCreated(sender, args) {
                    if ($find("RadPivotGrid1").get_filterWindow() != null) {
     
                        sender.get_filterWindow().add_show(function () {
     
                            var filterWindow = $find("RadPivotGrid1").get_filterWindow().get_contentElement();
                            var listBox = $find(filterWindow.getElementsByClassName("RadListBox")[0].id);
                                     //sort the items manually
                        });
     
                    }
                }
     
            </script>

    After you have the RadListBox object you have to manually sort the items by rearrange them.

    Regards,
    Kostadin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top