This commit is contained in:
2020-02-26 18:46:32 +00:00
parent a5b3444e4b
commit 1a36dad3e9
10 changed files with 70 additions and 73 deletions

View File

@@ -19,7 +19,7 @@ namespace AyaNova.DataList
}
public string SQLFrom { get; set; }
public List<AyaDataListFieldDefinition> FieldDefinitions { get; set; }//NOTE: First field after df is used as the title above the narrow grid view so it should be the name of the item to be shown that is most identifiable
public List<AyaDataListFieldDefinition> FieldDefinitions { get; set; }
public AuthorizationRoles AllowedRoles { get; set; }
public AyaType DefaultListObjectType { get; set; }
@@ -50,8 +50,7 @@ namespace AyaNova.DataList
StringBuilder sb = new StringBuilder();
sb.Append("[");
//df First column is always the df column
sb.Append($"{{\"cm\":\"df\",\"dt\":0,\"ay\":{(int)DefaultListObjectType}}}");
foreach (string s in ListViewFieldKeys)
{
@@ -75,6 +74,11 @@ namespace AyaNova.DataList
//Has a AyObjectType? (linkable / openable)
if (o.AyaObjectType != 0)
sb.Append($",\"ay\":{(int)o.AyaObjectType}");
//Row ID column?
if(o.IsRowId){
sb.Append($",\"rid\":1");
}
//Has a Enumtype?
if (!string.IsNullOrEmpty(o.EnumType))