Open zandiarash opened 1 month ago
Hi community I used a Datagrid in a project, I have grouped my table by a column (Days)
I want to ask how can I make my days orderByDescending ?
This is how I fill my binded collection
var res = Faults0DtoAll.OrderByDescending(x => x.FromDateTime).ToList(); Faults0DtoToShow = new ObservableCollection<Fault0Dto>(res);
And this is my Grid
<DataGrid TItem="Fault0Dto" Data="@Faults0DtoToShow" Sortable="true" PageSize="@totalItems" SortMode="DataGridSortMode.Single" Striped="true" Hoverable="true" Groupable Responsive > <DataGridColumns> <DataGridColumn TItem="Fault0Dto" Field="@nameof(Fault0Dto.ErrorCode)" Caption="کد خطا" /> <DataGridColumn TItem="Fault0Dto" Field="@nameof(Fault0Dto.ErrorDesc)" Caption="توضیح خطا" /> <DataGridColumn TItem="Fault0Dto" Field="@nameof(Fault0Dto.FromDayFa)" Caption="روز" SortField="@nameof(Fault0Dto.FromDayEn)" SortDirection="SortDirection.Descending" Displayable="false" Groupable Grouping /> ... </DataGridColumns> <EmptyTemplate> <p>هنوز داده ای موجود نیست</p> </EmptyTemplate> </DataGrid>
Hi community I used a Datagrid in a project, I have grouped my table by a column (Days)![image](https://github.com/Megabit/Blazorise/assets/10775073/b0bb5820-f551-48ce-8b8a-951b2ebbf9cb)
I want to ask how can I make my days orderByDescending ?
This is how I fill my binded collection
And this is my Grid