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

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

1 Answer 107 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chocks
Top achievements
Rank 1
Chocks asked on 19 Nov 2012, 12:10 PM
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.

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 19 Nov 2012, 02:29 PM
Hi,

Have you checked the frozen columns demo. ?


Greetings,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TreeView
Asked by
Chocks
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or