Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
Sorting a XamGrid column
posted

Hi,

I have a custom column that has an image for it's header and item template

<DataTemplate x:Key="NameTemplate" DataType="local:GridItemViewModelBase">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding Icon}" Width="16" Height="16" Margin="5,0,0,0" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding DisplayName}" Margin="5,0,0,0"/>
</StackPanel>
</DataTemplate>


<DataTemplate x:Key="PublishIconHeaderTemplate" DataType="local:GridItemViewModelBase">
<StackPanel Orientation="Horizontal">
<Image Source="pack://application:,,,/Application.Resource;component/Images/Commands/Sync/Publish_16x16.png" Visibility="Visible" Width="16" Height="16"/>
</StackPanel>
</DataTemplate>

The column can be. Is there a way to hide the arrow button when it is sorted but I can still sort the column by clicking on the header icon?

In this pic: 

https://ibb.co/dk5QNk

The highlighted arrow will not be shown (sorted or not -- so I only have the icon contained in the column (no extra spaces)), but when I click on the icon itself, I can still sort the column.

Thanks!

Parents
No Data
Reply
  • 2155
    Offline posted

    Hello Erika,

    You should be able to hide the arrow button that is displayed when a column is sorted by setting false to XamGrid.SortingSettings.ShowSortIndicator property like below.

            <ig:XamGrid x:Name="MyGrid">
                <ig:XamGrid.SortingSettings>
                    <ig:SortingSettings ShowSortIndicator="False"/>
                </ig:XamGrid.SortingSettings>
            </ig:XamGrid>

    I have attached the sample.

    Please let me know if I may be of further assistance.

    Thank you,
    Mihoko Kamiishi

    CASE-185229.zip
Children