This commit is contained in:
@@ -17,7 +17,14 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(dataFilter.Sort))
|
if (string.IsNullOrWhiteSpace(dataFilter.Sort))
|
||||||
{
|
{
|
||||||
return string.Empty;//used to be default order by
|
//sort by default field descending which should in theory always be the id column of the main object in the list
|
||||||
|
//which should return the results to user with most recent records at the top if no sort order was specified
|
||||||
|
if(objectFieldsList[0].FieldKey=="df"){
|
||||||
|
return $"ORDER BY {objectFieldsList[0].SqlIdColumnName} DESC";
|
||||||
|
}else{
|
||||||
|
//no default column so no idea how to sort
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
Reference in New Issue
Block a user