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

[Solved] Change Request - Adjust "GridViewHeaderCell" VisualStateGroups into "Common" and "Sorting" groups...

3 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 1
Rob asked on 10 Nov 2010, 05:41 PM
Hello,

I have a question (and an enhancement request) that the ControlTemplate of the GridViewHeaderCell be changed slightly.

Currently the states are:
<VisualStateManager.VisualStateGroups>
   <VisualStateGroup x:Name="CommonStates">
      <VisualState x:Name="Normal" />
      <VisualState x:Name="MouseOver" />
      <VisualState x:Name="Ascending" />
      <VisualState x:Name="Descending" />
   </VisualStateGroup>
</VisualStateManager.VisualStateGroups>


And I would like to see them grouped and a new state added like this:
<VisualStateManager.VisualStateGroups
   <VisualStateGroup x:Name="CommonStates"
      <VisualState x:Name="Normal" /> 
      <VisualState x:Name="MouseOver" /> 
   </VisualStateGroup
   <VisualStateGroup x:Name="SortStates"
      <VisualState x:Name="Unsorted" /> 
      <VisualState x:Name="Ascending" /> 
      <VisualState x:Name="Descending" /> 
   </VisualStateGroup
</VisualStateManager.VisualStateGroups>


This would align the states more closely to other similar controls as well as give the designer the ability to still show a mouseover effect when a column is sorted...

3 Answers, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 11 Nov 2010, 04:20 PM
Hello Rob,


I have prepared an example for you that demonstrates how to separate Sorting States in their own group within the template of GridViewHeaderCell and how to maintain the original mouse over effect in any of the sorting states.



All the best,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rob
Top achievements
Rank 1
answered on 12 Nov 2010, 02:55 PM
Wow - I wasn't aware you could just change the ControlTemplate like that...  Am I correct that is what you've done?  Or have I missed something? 
0
Vanya Pavlova
Telerik team
answered on 16 Nov 2010, 04:42 PM
Hi Rob,


Yes you are right, I have changed GridViewHeaderCell's template and copied the Ascending and Descending states along with a None state in their own group.
 
Kind regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Rob
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Rob
Top achievements
Rank 1
Share this question
or