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

scrolling issue with radgridview

2 Answers 168 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 29 Jun 2015, 03:56 PM

Hi,

 

I have a simple radgridview in a window. The auto scrolling on the radgridview seems to allow scrolling way past the last record. There are 52 records but no matter what height I give the gridview the scrolling always allows to scroll down past the last record with lots of white space. I have attached a screenshot. Below is my xaml:

 <Window x:Class="WishAdminWPF.RoomingListWindowView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:src="clr-namespace:WishAdminWPF"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  
             xmlns:VM="clr-namespace:WishAdminWPF.ViewModels"
             mc:Ignorable="d" 
             ResizeMode="NoResize"
             d:DesignHeight="400" d:DesignWidth="400"
            SizeToContent="WidthAndHeight"
             Title="Rooms"                    
             WindowStartupLocation="CenterScreen" Loaded="WindowBase_Loaded">
    <Window.DataContext>
        <VM:RoomingListWindowViewModel/>
    </Window.DataContext>
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
    </Window.Resources>
    <Grid Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="200"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
            <telerik:RadGridView Grid.Row="0" Grid.Column="0" Name="grdViewRoominglst" Margin="5" Width="380" Height="200"  VerticalAlignment="Top" 
                                 ItemsSource="{Binding RoomingList}"
                                 ShowGroupPanel="False"
                                 AutoGenerateColumns="False">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Room Type"  Width="auto" DataMemberBinding="{Binding RoomType}" IsReadOnly="True"/>
                    <telerik:GridViewDataColumn Header="Available" Width="auto" DataMemberBinding="{Binding RoomsAvail}" IsReadOnly="True" 
                                                IsVisible="{Binding ShowAvailableRooms, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                    <telerik:GridViewDataColumn Header="Number" Width="auto" DataMemberBinding="{Binding RoomsUsed}"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5">
            <Button  Height="25" Width="60" Margin="5,5,0,5" Name="btnOk" IsDefault="True" Click="btnOk_Click">OK</Button>
            <Button  Height="25" Width="60" Margin="5,5,0,5" Name="btnCancel" Click="btnCancel_Click">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 30 Jun 2015, 02:59 PM
Hi,

Would you please try configuring RadGridView with GroupRenderMode="Flat"? Does this make any difference?

Regards,
Dimitrina
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 01 Jul 2015, 12:04 PM
GroupRenderMode="Flat" fixed my problem. Thank you!
Tags
GridView
Asked by
Chris
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Chris
Top achievements
Rank 1
Share this question
or