Click here to Skip to main content
16,001,979 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all

i have one telerik grid for which scroll bar is not appearing even after applying the property
ScrollViewer.VerticalScrollBarVisibility=Auto.

please find my xaml design

<Grid Grid.Row="0" Height="*" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            
                            <RowDefinition Height="Auto" />
                            
                            <RowDefinition Height="Auto" />
                            
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        
                        <GroupBox Grid.ColumnSpan="2" Grid.Row="0" Header="Get Documents by..." Name="grpbxGetDocumentsBy" Style="{StaticResource SPClientUtilityStyleGroupBox}" >
                            <Grid Height="Auto" Width="Auto">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                            <Grid Grid.Row="0" Height="Auto" Width="Auto">
                                    <Grid.ColumnDefinitions>
                                        
                                        <ColumnDefinition Width="*" />
                                        
                                        <ColumnDefinition Width="*" />
                                        
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="*" />
                                        
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <RadioButton x:Name="rbtnMasterOBID" Content="Master _OBID" Grid.Column="0" GroupName="grpSearchType" Style="{StaticResource SPClientUtilityStyleRadioButton}" IsChecked="{Binding MasterOBID}" />
                                    <RadioButton x:Name="rbtnUID" Content="_UID" Grid.Column="1" GroupName="grpSearchType" Style="{StaticResource SPClientUtilityStyleRadioButton}" IsChecked="{Binding UID}" />

                                    <RadioButton x:Name="rbtnName" Content="_Name" Grid.Column="2" GroupName="grpSearchType" Style="{StaticResource SPClientUtilityStyleRadioButton}" IsChecked="{Binding Name}" />
                                    
                                    <RadioButton x:Name="rbtnSignature" Content="_Signature" Grid.Column="3" GroupName="grpSearchType" Style="{StaticResource SPClientUtilityStyleRadioButton}" IsChecked="{Binding Signature}" />
                                    <RadioButton x:Name="rbtnRetrievedDocuments" Content="_Retrieved Documents" Grid.Column="4" GroupName="grpSearchType" Style="{StaticResource SPClientUtilityStyleRadioButton}" IsChecked="{Binding RetrievedDocuments}" />
                                    

                                    <RadioButton x:Name="rbtnRetrievable" Content="_Retrievable" Grid.Column="5" GroupName="grpSearchType" Style="{StaticResource SPClientUtilityStyleRadioButton}" IsChecked="{Binding Retrievable}" />
                                </Grid>
                                
                                <TextBox Grid.Row="1" Margin="{StaticResource SPClientUtilityMarginEven}" Name="txtStringToApplyToSearch" Style="{StaticResource SPClientUtilityStyleTextBox}" Text="{Binding StringToApplyToSearch}" Width="Auto" />
                            </Grid>
                        </GroupBox>
                        
                        <Label Content="_Document Class" Grid.Column="0" Grid.Row="1" Style="{StaticResource SPClientUtilityStyleLabel}" />
                        <ComboBox Grid.Column="1" Grid.Row="1" Name="cmbDocumentClass" IsEditable="False" ItemsSource="{Binding Path=DocumentClass}" SelectedItem="{Binding Path=DocumentClassSelected, Mode=TwoWay}" Style="{StaticResource SPClientUtilityStyleComboBox}" />
                        <StackPanel Grid.ColumnSpan="2" Grid.Row="2" Height="Auto" HorizontalAlignment="Center" Orientation="Horizontal" VerticalAlignment="Center">
                            

                            <Button Content="_Find Documents" Name="btnFindDocuments" Style="{StaticResource SPClientUtilityStyleButtonWidthAutoNormal}"  Command="{Binding Path=CommandExecuteDocumentSearch}"/>
                        </StackPanel>
                        
                        <!--working telerik TODO-->
                        <telerik:RadGridView
                            AutoGenerateColumns="False"
                            CanUserDeleteRows="False"
                            CanUserInsertRows="False"
                            CanUserReorderColumns="False"
                            CanUserSortGroups="False"
                            CanUserSelect="True"
                            ColumnWidth="Auto"
                            Grid.ColumnSpan="2" Grid.Row="3" Height="*"
                            GroupRenderMode="Flat"
                            HorizontalAlignment="Center" 
                            HorizontalContentAlignment="Stretch" 
                            IsReadOnly="True"
                            ItemsSource="{Binding DocumentsToPublish}"
                            Margin="{StaticResource SPClientUtilityMarginEven}" 
                            x:Name="rgrdvDocumentsToPublish"
                            RowIndicatorVisibility="Collapsed"
                            ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
                            SelectionMode="Single"
                            SelectionUnit="FullRow"
                            ShowGroupPanel="False"
                            SelectionChanged="Grid_SelectedRoW"
                          
                            >
                            <telerik:RadGridView.Columns>
                                
                                <telerik:GridViewDataColumn Header="#" DataMemberBinding="{Binding DocumentNumber}" />
                                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding DocumentName}" />
                                <telerik:GridViewDataColumn Header="Type" DataMemberBinding="{Binding DocumentType}" />
                                
                                <telerik:GridViewDataColumn Header="Revision" DataMemberBinding="{Binding DocumentRevision}" />
                                <telerik:GridViewDataColumn Header="Version" DataMemberBinding="{Binding DocumentVersion}" />
                                
                                <telerik:GridViewDataColumn Header="Load Status" DataMemberBinding="{Binding DocumentLoadStatus}" />
                                

                                <telerik:GridViewDataColumn Header="Consolidate Status" DataMemberBinding="{Binding DocumentConsolidateStatus}" />
                                
                                <telerik:GridViewDataColumn Header="Workflow" DataMemberBinding="{Binding SetWorkflowUsedInPublish}" />
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
                        <GroupBox Grid.ColumnSpan="2" Grid.Row="4" Header="Retrieval Options" Name="grpbxRetrievalOptions" Style="{StaticResource SPClientUtilityStyleGroupBox}" >
                            <Grid Height="Auto" Width="Auto">
                                <Grid.RowDefinitions>
                                    
                                    <RowDefinition Height="Auto" />
                                    
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid Grid.Row="0" Height="Auto" Width="Auto">
                                    <Grid.ColumnDefinitions>
                                        
                                        <ColumnDefinition Width="*" />
                                        
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    
                                    <RadioButton x:Name="rbtnRaw" Content="_Raw" Grid.Column="0" GroupName="grpbxRetrievalOptions" Style="{StaticResource SPClientUtilityStyleRadioButton}" />
                                    
                                    <RadioButton x:Name="rbtnWithInstructions" Content="_With Instructions" Grid.Column="1" GroupName="grpbxRetrievalOptions" Style="{StaticResource SPClientUtilityStyleRadioButton}" />
                                    
                                    <RadioButton x:Name="rbtnLatestFromSPFWithInstructions" Content="_Latest from SPF with Instructions" Grid.Column="2" GroupName="grpbxRetrievalOptions" Style="{StaticResource SPClientUtilityStyleRadioButton}" />
                                </Grid>
                                <CheckBox Content="_Retrieve View File" Grid.Row="2" HorizontalAlignment="Center" Name="chkRetrieveViewFile" Style="{StaticResource SPClientUtilityStyleCheckBox}" />
                            </Grid>
                        </GroupBox>
                        
                        <StackPanel Grid.ColumnSpan="2" Grid.Row="5" Height="Auto" HorizontalAlignment="Center" Orientation="Horizontal" VerticalAlignment="Center">

                            <Button Content="_Retrieve Document" Name="btnRetrieveDocument" Style="{StaticResource SPClientUtilityStyleButtonWidthAutoHero}"  Command="{Binding Path=CommandExecuteDocumentRetrieve}"/>
                        </StackPanel>

                        <Label Content="Retrieval Folder" Grid.Column="0" Grid.Row="6" Style="{StaticResource SPClientUtilityStyleLabel}" />
                        <TextBox Grid.Column="1" Grid.Row="6" Name="txtRetrievalFolder" Style="{StaticResource SPClientUtilityStyleTextBoxDisabled}" Text="{Binding RetrievalFolder}" />
                        
                        <GroupBox Grid.ColumnSpan="2" Grid.Row="7" Header="View" Name="grpbxView" Style="{StaticResource SPClientUtilityStyleGroupBox}" >
                            <Grid Height="Auto" Width="Auto">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Button Content="_Metadata..." Grid.Column="0" Name="btnViewMetadata" Style="{StaticResource SPCLButtonBasicStyle}" />
                                <Button Content="_Data..." Grid.Column="1" Name="btnViewData" Style="{StaticResource SPCLButtonBasicStyle}" />
                                <Button Content="_Instructions..." Grid.Column="2" Name="btnViewInstructions" Style="{StaticResource SPCLButtonBasicStyle}" />
                            </Grid>
                        </GroupBox>
                    </Grid>
                    <!-- -->


please help
Posted

1 solution

sorry to post this question..i missed a simple logic of creating height property for telerik grid.without height the grid is taking auto as height and all the records are getting and filling the grid..now when i set the height to say 100 then only grid is displaying the height 100 and remaining records are getting scrolled
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900