Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

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

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

then the order when the grid is reloaded is

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


Example


Reference

gd.columns