Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

column custom sort order

 


html

 Select columns to sort in order: 

 <TABLE><TBODY><TR>
   <TD><SpotfireControl id="List box (multiple select) Property Control" /></TD>
   <TD><SpotfireControl id="Label Property Control" /></TD>
 </TR></TBODY></TABLE>
 <SpotfireControl id="IronPython Action Control" />


ironPython

# dt is a Data Table Script parameter
# values is a String List Document Property from a List box (multiple select) Property Control with Unique values in column
values = Document.Properties["values"]
dt.Columns["type"].Properties.SetCustomSortOrder(values)



hardcoded method

values = System.Collections.Generic.List[str](["A","B","AB","O"])
Document.Data.Tables["Table1"].Columns["type"].Properties.SetCustomSortOrder(values)

No comments: