Versions Compared

Key

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


Note
titleContent Freeze

As of July 25th, 2023, there is a content freeze on this page.

The variable pui.gridSort can be used to customize the client-side grid column sort by defining a sort function.

...

  • value1 = first field value to compare.
  • value2 = second field value to compare.
  • fieldName =name of the field that the grid is sorted by. [Available Added in Profound UI Version 5, Fix Pack 6.0 and later]
  • isDescending =true if sorting in descending sequence, false otherwise. [Available Added in Profound UI Version 5, Fix Pack 6.0 and later]
  • fieldDateFormat = date format of the field that the grid is sorted by, if the field is not a date null will be passed instead. [Available in Profound UI Version 5, Fix Pack 14.0 and later]
  • fieldInfo = formatting information of the field that the grid is sorted by; if the field does not contain any formatting information, a blank object will be passed instead. [Available in Profound UI Version 6 and later] 
    • Some of the properties in the field info are:
      • dataType - the field data type
      • dataLength - data length (only present if the field is a character or a numeric field)
      • formatting - field formatting
  • multiFields = When a multi-column sort executes, multiFields will reference an array of information about each column included in the sort. The preferred first sort column is the first entry in the array; the second preferred column is second; etc. This argument is undefined when the sort is for single-column sort executions. [Available in Profound UI Versions After Version 6, Fix Pack 2.1]
    • Properties of each object are the same as described above:
      • fieldName
      • fieldFormat
      • fieldDateFormat
      • value1
      • value2

Return Value:

The function should return a number that tells the grid which row should be placed before the other:

...

Info
Where do you save this configuration option?  Here