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

GridViewDataColumn VerticalAlignment

2 Answers 332 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jara
Top achievements
Rank 1
Jara asked on 28 Apr 2011, 03:12 PM
Hi,
Maybe someone know, how can I alignment GridViewDataColumn data to the top?
As shown in the picture.

Thanks,
Jara

2 Answers, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 28 Apr 2011, 03:21 PM
Hello Jara,

 

You may change this alignment by creating a simple style targeted at GridViewCell and set its VerticalContentAlignment property to Top, please refer to the following:


<UserControl
    x:Class="SilverlightApplication176.MainPage"
    Width="640" Height="480">
<UserControl.Resources>
    <Style TargetType="telerik:GridViewCell">
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource SampleDataSource}}">
        <telerik:RadGridView RowHeight="100"  ItemsSource="{Binding Collection}"/>
    </Grid>
</UserControl>


In a similar way you may change any other GridViewCell's properties. If a simple style targeted at GridViewCell does not satisfy your custom needs you have to edit its template. 


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
0
Jara
Top achievements
Rank 1
answered on 29 Apr 2011, 08:57 AM
Thanks, its work.
Tags
GridView
Asked by
Jara
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Jara
Top achievements
Rank 1
Share this question
or