Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
830
Reset Sorting for Pivot Grid
posted

Hi,

Is there a way to unsort or reset sort on igPivotGrid?

  • 23953
    Verified Answer
    Offline posted

    Hello,

    There is no public API that you can use to achieve that. However you can use a private variable "_tableView" like this:

    function resetSort() {

        var pivot = $("#pivotGrid").data("igPivotGrid");

        pivot._tableView.levelSortDirections([]);

        pivot._tableView.columnSortDirections([]);

        pivot._tableView.initialize();

        pivot.updateGrid();

    }

    Here is a Fiddle: http://jsfiddle.net/ef91c50o/2/

    Note: As this approach uses an internal variable, it might not work in future versions.

    Best regards,
    Martin Pavlov
    Infragistics, Inc.