How center the checkbox in the Grid using RIA?

2 posts, 1 answers
  1. Chris
    Chris avatar
    53 posts
    Member since:
    Oct 2012

    Posted 01 Jul 2010 Link to this post


                         How to center the checkbox on the grid? Since I'm using RIA to populate it.   
                         Is there a way or this is a limitation?

                 Please help...

  2. Answer
    Maya avatar
    4062 posts

    Posted 02 Jul 2010 Link to this post

    Hi Chris,

    There is no limitation when setting the position of a CheckBox in the grid. All you need to do is to predefine your CellStyle. You can create it as:

    <telerik:GridViewDataColumn IsReadOnly="True" Header="Id" DataMemberBinding="{Binding ProductId}">
                            <Style TargetType="telerik:GridViewCell">
                                <Setter Property="HorizontalContentAlignment" Value="Center"/>

    or in case you need a more complex structure:
    <telerik:GridViewDataColumn IsReadOnly="True" Header="Id">
                         <Style TargetType="telerik:GridViewCell">
                            <Setter Property="HorizontalContentAlignment"                         Value="Center"/>
                                 <TextBlock VerticalAlignment="Top"                         Text="{Binding ProductId}"/>


    Kind regards,
    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
Back to Top