Skip to content

Provide a way to sort History by Name #108

Description

@Rickyd56

Is your feature request related to a problem? Please describe.
This is not a bug, and with some modifications to the code, splitting the Icon and Name into two columns, I was able to make it work
Describe the solution you'd like
Allow the user to clickon the name header of the History page to sort the name column

Describe alternatives you've considered
As mentioned, I modified the grid and placed the icon in the first column and added a second column for the name

Additional context
Below is the Grid that I modified in the DataUsageHistoryV.xaml

    <DataGridTemplateColumn x:Name="DG_Icon" Header="Icon" HeaderStyle="{StaticResource ModernDGCHeaderStyle1}" CellStyle="{StaticResource ModernDGCellStyle1}">
        <DataGridTemplateColumn.CellTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <Image Source="{Binding Icon}" Width="16" Height="16" Margin="0,0,8,0"/>
                    <!-- <TextBlock Text="{Binding Name}" VerticalAlignment="Center"/> -->
                </StackPanel>
            </DataTemplate>
        </DataGridTemplateColumn.CellTemplate>
    </DataGridTemplateColumn>
    <DataGridTextColumn Header="Name" Binding="{Binding Name}" 
        HeaderStyle="{StaticResource ModernDGCHeaderStyle1}">
        <DataGridTextColumn.CellStyle>
            <Style TargetType="DataGridCell">
                <EventSetter Event="Control.MouseDoubleClick" Handler="Cell_MouseDoubleClick"/>
            </Style>
        </DataGridTextColumn.CellStyle>
    </DataGridTextColumn>

    <!-- <DataGridTextColumn x:Name="DG_DataName" Header="Name" Binding="{Binding Name}" HeaderStyle="{StaticResource ModernDGCHeaderStyle1}" CellStyle="{StaticResource ModernDGCellStyle1}" /> -->
    <DataGridTextColumn x:Name="DG_DataRecv" Header="Data Received" Binding="{Binding CurrentDataRecv, Converter={StaticResource converterBytes}}" HeaderStyle="{StaticResource ModernDGCHeaderStyle2}" CellStyle="{StaticResource ModernDGCellStyle2}"/>
    <DataGridTextColumn x:Name="DG_DataSent" Header="Data Sent" Binding="{Binding CurrentDataSend, Converter={StaticResource converterBytes}}" HeaderStyle="{StaticResource ModernDGCHeaderStyle2}" CellStyle="{StaticResource ModernDGCellStyle2}"/>
</DataGrid.Columns>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions