How to freeze a RadTreeListView header which is inside a Scrollviewer control

2 posts, 0 answers
  1. Chocks
    Chocks avatar
    12 posts
    Member since:
    May 2012

    Posted 19 Nov 2012 Link to this post

    Hi,

    I am having a RadTreeListView inside a Scrollviewer control
    How to freeze a header of a RadTreeListView  grid which is inside a Scrollviewer control.
    The grid works fine with the scrollview, but when I use the scrollbar, the header of the grid is also getting hided,
    Is there anyway to free similar to Excel.


    <ScrollViewer x:Name="scrollMainGrid" Padding="0,0,0,0" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" >
    <telerikgridview:RadTreeListView Name="grdPrclist"
    AutoGenerateColumns="False" SelectionMode="Single" 
                                    Height="Auto" Width="Auto"  VerticalAlignment="Top" 
    Grid.Row="1" Grid.Column="0" RowDetailsVisibilityMode="Collapsed"
                SelectionChanging="Grid_SelectionChanging"
                 SelectionChanged="GridRow_SelectionChanged"
    RowLoaded="Prclist_RowLoaded" IsFilteringAllowed="True"
      Padding="0,0,0,0" IsReadOnly="True"  AlternateRowBackground="Transparent"
                                    RowIndicatorVisibility="Collapsed" Background="{StaticResource GridBG}">
     
                                   <telerikgridview:RadTreeListView.HeaderRowStyle>
                                       <Style TargetType="gridView:GridViewHeaderRow">
                                       <Setter Property="BorderBrush" Value="#FFB7E8EF" />
                                       <Setter Property="BorderThickness" Value="0" />
                                       <Setter Property="Background" Value="{StaticResource GridHeaderRowBG}" />
                                       <Setter Property="Foreground" Value="White" />
                                       <Setter Property="HorizontalAlignment" Value="Center"/>
                                            
                                   </Style>
                                   </telerikgridview:RadTreeListView.HeaderRowStyle>
     
                                   <telerikgridview:RadTreeListView.Columns>
     
     
                                       <telerikgridview:GridViewDataColumn IsVisible="False" UniqueName="ChkPrc" HeaderCellStyle="{StaticResource MyHeaderCellStyle}" Header="Select">
                                           <telerikgridview:GridViewDataColumn.CellTemplate>
                                               <DataTemplate>
                                                   <Grid Width="Auto">
                                                       <CheckBox Name="ChkPrc" Click="ChkPrc_Click"  VerticalAlignment="Center" ></CheckBox>
                                                   </Grid>
                                               </DataTemplate>
                                           </telerikgridview:GridViewDataColumn.CellTemplate>
                                       </telerikgridview:GridViewDataColumn>

    ...............

    </ScrollViewer>




    Thanks and Regards,
    V.Chocks.
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 19 Nov 2012 Link to this post

    Hi,

    Have you checked the frozen columns demo. ?


    Greetings,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top