This commit is contained in:
@@ -18,7 +18,8 @@ namespace AyaNova.DataList
|
||||
//well, not here exactly but add a new DATALIST class if it will be displayed as a list anywhere in the UI or reported on
|
||||
public AyaDataList()
|
||||
{
|
||||
|
||||
// DefaultColumns = new List<string>();
|
||||
// DefaultSortBy = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public string SQLFrom { get; set; }
|
||||
@@ -36,11 +37,12 @@ namespace AyaNova.DataList
|
||||
//set defaults if not provided in listOptions
|
||||
public void SetListOptionDefaultsIfNecessary(DataListBase listOptions)
|
||||
{
|
||||
if(listOptions is DataListTableOptions){//if this doesn't work then just ditch this method in favor of local code, it's not really saving much
|
||||
if (((DataListTableOptions)listOptions).Columns.Count == 0)
|
||||
((DataListTableOptions)listOptions).Columns = DefaultColumns;
|
||||
if (listOptions is DataListTableOptions)
|
||||
{//if this doesn't work then just ditch this method in favor of local code, it's not really saving much
|
||||
if (((DataListTableOptions)listOptions).Columns.Count == 0)
|
||||
((DataListTableOptions)listOptions).Columns = DefaultColumns;
|
||||
}
|
||||
|
||||
|
||||
if (listOptions.SortBy.Count == 0)
|
||||
listOptions.SortBy = DefaultSortBy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user