How can I to define the sort order of a non sorted column first SortOrder.Descending and then SortOrder.Ascending if I click again?
The goal is not to have the column so sorted, but to click once instead of two clicks to get the SortOrder -> Descending.
In this example, I want to get with only one click the Products which are discontinued
@using RadzenBlazorDemos.Data
@using RadzenBlazorDemos.Models.Northwind
@using Microsoft.EntityFrameworkCore
@inherits DbContextPage
<RadzenDataGrid AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.Advanced" AllowSorting="true" PageSize="5" AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true"
Data="@employees" ColumnWidth="300px" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single" @bind-Value=@selectedEmployees><Columns>
<RadzenDataGridColumn Property="@nameof(Product.ProductID)" Filterable="false" Title="ID" Frozen="true" Width="80px" TextAlign="TextAlign.Center" />
<RadzenDataGridColumn Property="@nameof(Product.ProductName)" Title="First Name" Frozen="true" Width="160px" />
<RadzenDataGridColumn Property="@nameof(Product.Discontinued)" Title="Pair ID" >
</RadzenDataGridColumn>
</Columns>
</RadzenDataGrid>
@code {
IEnumerable<Product> employees;
IList<Product> selectedEmployees;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
employees = dbContext.Products;
selectedEmployees = new List<Product>(){ employees.FirstOrDefault() };
}
}