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

[Solved] RenderTransform gridview header

1 Answer 116 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.
uku
Top achievements
Rank 1
uku asked on 29 Dec 2009, 01:17 AM
Hello,

I've several small checkbox columns within my gridview. Because the columns are to small for a meaningful header my idea was to use RenderTransform and rotate the header.

                <telGrid:GridViewDataColumn UniqueName="IsEnabled" DataMemberBinding="{Binding Path=IsEnabled}" IsFilterable="False">  
                    <telGrid:GridViewDataColumn.Header> 
                        <telGridView:AlignmentContentPresenter Content="Enabled" RenderTransformOrigin="0.5,0.5">  
                            <telGridView:AlignmentContentPresenter.RenderTransform> 
                                <RotateTransform Angle="90"/>  
                            </telGridView:AlignmentContentPresenter.RenderTransform> 
                        </telGridView:AlignmentContentPresenter> 
                    </telGrid:GridViewDataColumn.Header> 
                </telGrid:GridViewDataColumn> 
 

The problem is now that even if there is enough space for the header, the header content is truncated because the header didn't take care that the text is rotated. Does anybody know a solution for this problem?

Thanks

Uwe

1 Answer, 1 is accepted

Sort by
0
Kalin Milanov
Telerik team
answered on 04 Jan 2010, 12:47 PM
Hi uku,

When you are using RenderTransform on the AlignmentContentPresenter you are just rotating the element and the surrounding elements are unaware of that transformation. You will need to use LayoutTransform which however is only available for WPF.

In order to bypass this Silverlight limitation you can use the Telerik's LayoutTransformControl. I have prepared a sample which illustrate how to go about doing that.

I hope it fits your case.

Regards,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
uku
Top achievements
Rank 1
Answers by
Kalin Milanov
Telerik team
Share this question
or