This commit is contained in:
@@ -74,19 +74,19 @@ namespace AyaNova.DataList
|
||||
sb.Append("{");
|
||||
//Build required part of column definition
|
||||
if (!o.IsCustomField)
|
||||
sb.Append($"\"cm\":\"{o.LtKey}\",\"dt\":{(int)o.UiFieldDataType}");
|
||||
sb.Append($"\"cm\":\"{o.TKey}\",\"dt\":{(int)o.UiFieldDataType}");
|
||||
else
|
||||
{
|
||||
//insert specific type for this custom field
|
||||
if (CustomFieldDefinitions.ContainsKey(o.LtKey))
|
||||
if (CustomFieldDefinitions.ContainsKey(o.TKey))
|
||||
{
|
||||
var customFieldType = CustomFieldDefinitions[o.LtKey];
|
||||
sb.Append($"\"cm\":\"{o.LtKey}\",\"dt\":{customFieldType}");
|
||||
var customFieldType = CustomFieldDefinitions[o.TKey];
|
||||
sb.Append($"\"cm\":\"{o.TKey}\",\"dt\":{customFieldType}");
|
||||
}
|
||||
else
|
||||
{
|
||||
//this is normal as there may not be a definition for a Custom field but it's been requested so just treat it like text
|
||||
sb.Append($"\"cm\":\"{o.LtKey}\",\"dt\":{(int)UiFieldDataType.Text}");
|
||||
sb.Append($"\"cm\":\"{o.TKey}\",\"dt\":{(int)UiFieldDataType.Text}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace AyaNova.DataList
|
||||
{
|
||||
//this relies on the convention I'm using of AyaType name as the first part of all custom fields lT keys, e.g.
|
||||
//WidgetCustom1 -> Widget
|
||||
var ayatypename = d.LtKey.Split("Custom")[0];
|
||||
var ayatypename = d.TKey.Split("Custom")[0];
|
||||
if (!typesProcessed.Contains(ayatypename))
|
||||
{
|
||||
//make sure we do each type only once
|
||||
|
||||
Reference in New Issue
Block a user