Hi,
I´m trying to create DataGrid in XAML (i use xamarin.forms - with your component 16.4.0.53). I have 3 columns (DateTime, Date, Value). Example: 2019-02-15 23:15:10.111, 2019-02-15 00:00:00.000, "value text"
I need implement all this parameters:
- group by: Date (only date without show time) - i need format: 'dd.MM.yyyy' with sort descending
- sort by: DateTime descending
- show column: Time (HH:mm:ss) and Value
I attach a picture with wrong sort of groups (groups are not descending by date)
How to do it?
Next question: how to translate or change string 'Items'
Can you help me or provide any sample? Thx
My code:
<syncfusion:SfDataGrid x:Name="DataGridAlarms" ColumnSizer="Star" AutoGenerateColumns="False" RowHeight="25" SelectionMode="Single" AutoExpandGroups="False" AllowGroupExpandCollapse="True" QueryRowHeight="DataGridAlarms_QueryRowHeight">
<!--Grouping->
<syncfusion:SfDataGrid.GroupColumnDescriptions>
<syncfusion:GroupColumnDescription ColumnName="Date" />
</syncfusion:SfDataGrid.GroupColumnDescriptions>
<syncfusion:SfDataGrid.Columns x:TypeArguments="syncfusion:Columns">
<syncfusion:GridDateTimeColumn MappingName="Date" HeaderText="Date" Format="dd.MM.yyyy" IsHidden="True" GroupMode="Display" SortMode="Value" AllowSorting="True" >
</syncfusion:GridDateTimeColumn>
<syncfusion:GridDateTimeColumn MappingName="DateTime" Format="HH:mm:ss" HeaderText="Time" AllowSorting="True"Width="65" >
</syncfusion:GridDateTimeColumn>
<syncfusion:GridTextColumn MappingName="Text" HeaderText="Value" AllowSorting="True">
</syncfusion:GridTextColumn>
</syncfusion:SfDataGrid.Columns>
<!--Sorting->
<syncfusion:SfDataGrid.SortColumnDescriptions>
<syncfusion:SortColumnDescription ColumnName="DateTime" SortDirection="Descending" />
</syncfusion:SfDataGrid.SortColumnDescriptions>
</syncfusion:SfDataGrid>
Attachment:
DataGrid_c372c3f7.zip