This commit is contained in:
@@ -39,7 +39,7 @@ namespace AyaNova.DataList
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Newtonsoft.Json.Linq.JArray GenerateListColumnsJSONFromListView(JArray listViewArray)
|
||||
{
|
||||
@@ -50,7 +50,8 @@ namespace AyaNova.DataList
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append("[");
|
||||
|
||||
|
||||
bool FirstColumnAdded = false;
|
||||
|
||||
foreach (string s in ListViewFieldKeys)
|
||||
{
|
||||
@@ -66,7 +67,8 @@ namespace AyaNova.DataList
|
||||
if (o != null)
|
||||
{//Here is where we can vet the field name, if it doesn't exist. For production we'll just ignore those ones
|
||||
|
||||
sb.Append(",");
|
||||
if (!FirstColumnAdded)
|
||||
sb.Append(",");
|
||||
sb.Append("{");
|
||||
//Build required part of column definition
|
||||
sb.Append($"\"cm\":\"{o.LtKey}\",\"dt\":{(int)o.UiFieldDataType}");
|
||||
@@ -74,10 +76,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");
|
||||
if (o.IsRowId)
|
||||
{
|
||||
sb.Append($",\"rid\":1");
|
||||
}
|
||||
|
||||
//Has a Enumtype?
|
||||
@@ -85,6 +88,7 @@ namespace AyaNova.DataList
|
||||
sb.Append($",\"et\":\"{AyaNova.Util.StringUtil.TrimTypeName(o.EnumType)}\"");
|
||||
|
||||
sb.Append("}");
|
||||
FirstColumnAdded = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user