From 6430da202f448c50a5e8d21de864878fff232242 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 12 Jan 2022 22:56:11 +0000 Subject: [PATCH] --- docs/8.0/ayanova/docs/ay-start-form-data-tables.md | 3 +++ server/AyaNova/DataList/DataListFieldDefinition.cs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/8.0/ayanova/docs/ay-start-form-data-tables.md b/docs/8.0/ayanova/docs/ay-start-form-data-tables.md index f6be4d01..a5767d52 100644 --- a/docs/8.0/ayanova/docs/ay-start-form-data-tables.md +++ b/docs/8.0/ayanova/docs/ay-start-form-data-tables.md @@ -143,6 +143,9 @@ To remove a sort click on the column header name until the sort arrow indicator The column position does not affect the sort order only the selection made. +##### Sorting on Type fields + +Type fields can not be sorted in alphabetical order as they do not have a Name stored in the database, only a number. They sort by the underlying internal numerical value that indicates that particular type. This means you will see the column is sorted with identical types grouped together, however the displayed translated text representing these types is not sorted alphabetically. Type fields have square brackets around their translated display names in the column to indicate they are a type rather than a text field. #### Filtering columns diff --git a/server/AyaNova/DataList/DataListFieldDefinition.cs b/server/AyaNova/DataList/DataListFieldDefinition.cs index 74e20ce4..e9fda656 100644 --- a/server/AyaNova/DataList/DataListFieldDefinition.cs +++ b/server/AyaNova/DataList/DataListFieldDefinition.cs @@ -55,8 +55,7 @@ namespace AyaNova.DataList public string SqlATypeColumnName { get; set; }//column to fetch the AyaType openabel for this field to set it dynamically instead of preset [JsonIgnore] public string SqlColorColumnName { get; set; }//column to fetch the color if applicable to this field - - + public DataListFieldDefinition() { //most common defaults @@ -65,11 +64,12 @@ namespace AyaNova.DataList IsSortable = true; IsRowId = false; IsMeta = false; - Translate=false; + Translate = false; //Set openable object type to no type which is the default and means it's not a link to another object AType = (int)AyaType.NoType; SqlATypeColumnName = null;//must be null as that is checked against specifically - SqlColorColumnName = null;//must be null to be ignored properly + SqlColorColumnName = null;//must be null to be ignored properly + } //Get column to query for display name or use FieldName if there is no difference