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!
How do I do it on a per column basis -- say if I have 2 columns and for one I don't show the sort indicator but show it on the other column.
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