Table functions > Default sorting
Crud Elite
Action Column
Table functions
Common issues
Other
How it works
There are times when you want the table to be sorted by the "Name" column in ascending order by default. Other times, you may prefer to sort it by the "CreationDate" column instead. Here's how you can set the default sorting order of the table based on your needs.
Edit the DefaultSortOrder
in ClientTableConfig
. The screenshot below means that, by default, the table listing is sorted by the Name column in ascending order (appending -asc
behind it). If you want to sort by descending order, use -desc
instead. Below are some examples.
$"{nameof(ClientViewModel.**Name**)}**-asc**" |
Sort by Name column in ascending order |
---|---|
$"{nameof(ClientViewModel.**Name**)}**-desc**" |
Sort by Name column in descending order |
$"{nameof(ClientViewModel.**CreationDate**)}**-asc**" |
Sort by CreationDate column in ascending order |
$"{nameof(ClientViewModel.**CreationDate**)}**-desc**" |
Sort by CreationDate column in descending order |