col.xyz.defaultSort

Use this property to specify a default sorting when viewing a grid

Class

column

Property

col.xyz.defaultSort

Formal specification

col.xyz.defaultSort = "Ascending" | "Descending"

Required

no

Default

none

Version

1.11

Comment

When this property is set, the grid is sorted on this specific column (either ascending or descending)
When multiple columns are specifying a defaultSort, the sort order is according to the column order in gd.columns
for instance

gd.columns = city, zip, street, housenumber col.zip.defaultSort = Ascending col.housenumber.defaultSort = Descending

then the order when the grid is reloaded is

select city, zip, street, housenumber where issueid = x order by zip asc, housnumber desc



Example



Reference

gd.columns