This is a migrated thread and some comments may be shown as answers.

Sort Index Numbers are missing in RadGridView

2 Answers 173 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vijay
Top achievements
Rank 1
Vijay asked on 25 Jun 2018, 11:31 PM

Hi,

I am using a RadGridView with property ShowColumnSortIndexes set as "True".

The index numbers were displaying properly when I did multi column sorting.

But now the sort index numbers are not displayed since we used a template for GridViewHeaderCell to customize the look of header cells.

Could someone please help me to get the sort index numbers back in GridViewHeaderCell template?

Thanks,

Vijay

 

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 26 Jun 2018, 03:28 PM
Hello Vijay,

If you are customizing the GridViewHeaderCell by setting its Template property it is expected to lose the sort index number indicator. In order to preserve this you will need to define a control that will display the indicator in the new Template. You can see the default indicator element by extracting the ControlTemplate of the GridViewHeaderCell and findin the ContentControl defined just under the Path with x:Name set to "PART_SortIndicator". The you can copy it in the new customized template.

I hope that helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Geoff
Top achievements
Rank 1
answered on 28 Jun 2018, 04:35 AM

Thanks a lot Martin.

I copied ContentControl from GridView.xaml theme into the template and now Sort Index number is displaying as expected.

 

 

Tags
GridView
Asked by
Vijay
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Geoff
Top achievements
Rank 1
Share this question
or