Ignore Hierarchy in Cross Table Sorting - through IronPython

You know how to Ignore Hierarchy while sorting a Cross Table (If you don't, this might help you).
Question : But, How to do that pragmatically ?
Answer   : Use the code below

from Spotfire.Dxp.Application.Visuals import *
from Spotfire.Dxp.Data import SortOrder

v = v.As[Visualization]()

if v.SortRowsMode == CrossTablePlot.SortMode.Global :
 v.SortRowsMode = CrossTablePlot.SortMode.Leaf
else :
 v.SortRowsMode = CrossTablePlot.SortMode.Global
Share: