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

[Solved] How to Move Filter Icon in the GridViewColumnHeader

3 Answers 130 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.
Minwei
Top achievements
Rank 1
Minwei asked on 03 Nov 2010, 05:52 AM
Hi Telerik,

Can I move the filter icon in GridViewColumnHeader to the button right corner of the GridViewColumnHeader?
Again, if I change the control trmplate of GridViewColumnHeader, when I click filter the whole grid crashed.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 08 Nov 2010, 12:31 PM
Hello Minwei,

I have prepared an example for you that demonstrates how to move the Filtering Icon in the GridViewHeaderCell to the upper right corner and everything works fine on my side.

If you have any difficulties feel free to modify the attached project and sent it back to me.

Sincerely yours,
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
Minwei
Top achievements
Rank 1
answered on 09 Nov 2010, 05:46 AM
Hi,

Your solution is to modify the HeaderCell Template right? However in my project, once I customized the template, even thourgh I didn't change anything of it, when I click some columns' filter icon, mostly in the row behind, it will crash. 

I try to set style specifically for FilteringDropDown, then it works. Nonetheless, why once I modify template of HeaderCell it will crash.
Your responce will be highly appreciated.
Thank you,
0
Vanya Pavlova
Telerik team
answered on 10 Nov 2010, 09:30 AM
Hi Minwei,


Yes, you are right - the effect was achieved through editing the template of GridViewHeaderCell.  I am not quite sure why it crashed in your case , so that I would like to suggest you to follow these steps:


1.Drag from Assets library in Expression Blend a GridViewHeaderCell
2.Right click on it -> Edit  template -> Edit a copy.
3.In Objects and Timeline window select the PART_DistinctFilterControl.
4.Change its HorizontalAlignment property to Right, and VerticalAlignment to Top. 
    By default these values are set to Stretch. 
5.As an option you can change its Margin property to meet your personal requirements.


Please let me know if you need any further assistance.


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
Minwei
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Minwei
Top achievements
Rank 1
Share this question
or