Wrap radgridview header

1 posts, 0 answers
  1. sandy
    sandy avatar
    66 posts
    Member since:
    Aug 2010

    Posted 20 Feb 2012 Link to this post

    Hi ,
    i have a issue.
    am displaying radgridview column headers dynamically from database. Am not decalring any statments to headers.
    this is my rad gridview code.
    <telerik:RadGridView x:Name="rgvMeterReads" ItemsSource="{Binding Data}" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0" Margin="0,0,0,0" ShowGroupPanel="False" AlternateRowBackground="#CCCC66" AlternationCount="2" ShowColumnHeaders="True" RowIndicatorVisibility="Collapsed" RowHeight="15" Width="1000" Height="650" CanUserDeleteRows="False" CanUserFreezeColumns="False" CanUserInsertRows="False">
                                    <Style TargetType="telerik:GridViewHeaderCell">
                                        <Setter Property="Background" Value="Transparent"/>
                                        <Setter Property="Foreground" Value="Black" />
                                        <Setter Property="BorderBrush" Value="Blue"/>
                                    <Style TargetType="telerik:GridViewHeaderRow">
                                        <Setter Property="Background" Value="#66CCFF" />
                                    </Style >

    so how can wrap the header of the radgridview.
    so my prob is some col header names are long and data is less.
    so my clent asks to display the radgridview header in 2 lines.
    here am sending my radgridview header image.
    in header read source is one col header.
    so i have to diaplay read in one line and below on same line source.
    Am tried this  code. but getting wrror in textwrapping property.
    Am tried several ways as mentioned in forum but getting error in textwrapping property.

    <telerik:GridViewDataColumn Width="100" >
            <TextBlock Text="Stadium Established Date" TextWrapping="Wrap" />

    pls help me.
Back to Top