Posted 7 November 2017, 2:41 am EST
I have a problem with sorting when creating a custom showdetail window for flexpivot.
When I’m not sorting the flexpivotgrid it works great, I get the right details for my custom detailwindow, but when I’m sorting the flexpivotgrid first, then I get the wrong results from getdetail function.
I guess it´s because I have sorted the flexpivotgrid and not the FlexPivotTable in flexpivotengine
It works with your standard “show detail” in contextmenu, but I want to have a custom window.
Is there a way to sort the flexpivottable when sorting the flexpivotgrid or to get the “right” sorted rownumber from flexpivottable.
My code for getting details
C1FlexPivotPage.FlexPivotEngine.GetDetail(C1FlexPivotPage.FlexPivotEngine.FlexPivotTable.Rows(hti.Row - iOlapEngineCols), C1FlexPivotPage.FlexPivotEngine.FlexPivotTable.Columns(hti.Column - iOlapEngineRows).ColumnName)
So, if I have row 3 with item 321, click on show details it works great. If I then sort the result on values, stil on the same row, show details, it still shows the detail rows based on the original unsorted values, not the new row 3 with intem 123.
Then, the next question. I have a resultset containing field Custno, Value, Item no, and Aggregated values.
in the selectable columns, it is now sorted from A-Z. I vould like to have the columns in exacly the same order as in my resultset.
How to do this? I would be more logical to have the columns in the as is order then sort it?
Cheers
Peter