Hi,
I'd like to order my pivot grid row with dimension sorting.
I have something like:
Dimension1 - Measure1 - Measure2
****x*********-*****54*****-******88****
****z*********-*****54*****-******88****
****y*********-*****54*****-******88****
I'd like to have x,y,z, and not x,z,y.
this my dimension definition:
{ name: 'Dimension1', caption: 'Dimension1', hierarchies: [{ name: 'Dimension1', caption: 'Dimension1', levels: [{ name: 'Dimension1', caption: 'Dimension1', memberProvider: function (item) { return item.Dimension1; } }] }] },
I tried with:
$("#myDiv").data("igPivotGrid")._tableView.columnSortDirections([{"memberNames":["[Dimension1].[Dimension1]"],"tupleIndex":3,"sortDirection":"ascending"}]); $("#myDiv").data("igPivotGrid")._tableView.initialize(); $("#myDiv").data("igPivotGrid").updateGrid();
but it doesn't works
Hello Francesco,
You need to use igPivotGrid.options.levelSortDirections option like this:
$("#pivotGrid").igPivotGrid({ levelSortDirections: [ { levelUniqueName: "[Dimension1].[Dimension1]", sortDirection: "ascending" } ] });
Best regards, Martin Pavlov Infragistics, Inc.