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

How to control display of rows in RadGridView

5 Answers 534 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 30 Sep 2011, 04:39 PM
I've got a RadGridView on a WPF form.  The control is in a cell of a Grid control.  The cell isn't tall enough to show a full number of rows all of the same height.  That is, the last row at the bottom is displaying as a partial row.

When I scroll all the way down to the bottom, the last row is not displaying fully.  Even though the scroll bar is all the way down, it doesn't scroll the whole last row into view.

How do I fix this so the last row will display in full?

Tony

Edit:  Here is the XAML for the RadGridView control:

<my:RadGridView AlternationCount="1" 
           AutoExpandGroups="True" 
           AutoGenerateColumns="False" 
           CanUserDeleteRows="False" 
           CanUserFreezeColumns="False" 
           CanUserInsertRows="False" 
           CanUserResizeColumns="True"
           CanUserSortColumns="True" 
           DataLoadMode="Asynchronous" 
           EnableColumnVirtualization="True" 
           EnableRowVirtualization="True" 
           FontSize="18" 
           FontWeight="Bold" 
           Grid.Column="1" 
           Grid.Row="1" 
           IsReadOnly="True" 
           Margin="5" 
           Name="HotListResults" 
           SelectionChanged="HotListResults_SelectionChanged"
           SelectionUnit="FullRow" 
           ScrollViewer.CanContentScroll="True" 
           ScrollViewer.HorizontalScrollBarVisibility="Auto" 
           ScrollViewer.VerticalScrollBarVisibility="Auto" 
           ShowGroupFooters="True"
           ToolTip="Matching Hot List Entries">
    <my:RadGridView.Columns>
        <my:GridViewDataColumn DataMemberBinding="{Binding ListName,   Mode=OneWay}" Header="Hot List"    Width="150" />
        <my:GridViewDataColumn DataMemberBinding="{Binding AlarmClass, Mode=OneWay}" Header="Alarm Class" Width="200" />
        <my:GridViewDataColumn DataMemberBinding="{Binding CountryId,  Mode=OneWay}" Header="Country"     Width="100" />
        <my:GridViewDataColumn DataMemberBinding="{Binding LocaleCode, Mode=OneWay}" Header="State"       Width="75" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Plate,      Mode=OneWay}" Header="Plate"       Width="150" />
        <my:GridViewDataColumn DataMemberBinding="{Binding BeginDate,  Mode=OneWay, Converter={StaticResource DateConverter}}" Header="Begin Date" Width="200" />
        <my:GridViewDataColumn DataMemberBinding="{Binding EndDate,    Mode=OneWay, Converter={StaticResource DateConverter}}" Header="End Date"   Width="200" />
    </my:RadGridView.Columns>
</my:RadGridView>

5 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 03 Oct 2011, 08:52 AM
Hi Tony,



Indeed we had similar issue, which was immediately fixed. I have just tested the behavior you described using the snippet provided, but I was not able to replicate such a behavior. 
May you please take a look at the attached project and let me know how it differs from yours? 
Any additional information about the grid version you used will be highly appreciated as well. 
Furthermore you may change the project and sent it back to us in a new support ticket.
We can take a look at it and we would be able to provide you with an appropriate solution. 



Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Kevin
Top achievements
Rank 1
answered on 29 Dec 2011, 08:03 PM
I used your example solution but modified IsReadOnly to false and set TextWrapping to true for the first column in the grid.  The last row now gets cut off.
0
Vanya Pavlova
Telerik team
answered on 29 Dec 2011, 08:15 PM
Hi Kevin,

 

Would it be possible to send us the modified version of the project as an attachment in a new support ticket? We will take a look at it and we will do our best to provide you with an appropriate solution. 
Any additional information about the grid version you used will be highly appreciated as well. 




Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Kevin
Top achievements
Rank 1
answered on 29 Dec 2011, 08:49 PM
<Window
    x:Class="WpfApplication179.MainWindow"
    x:Name="Window"
    Title="MainWindow"
    Width="640" Height="480">
 
    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SampleDataSource}}">
        <my:RadGridView AlternationCount="1"
 
           AutoExpandGroups="True"
           AutoGenerateColumns="False"
           CanUserDeleteRows="False"
           CanUserFreezeColumns="False"
           CanUserInsertRows="False"
           CanUserResizeColumns="True"
           CanUserSortColumns="True"
           DataLoadMode="Asynchronous"
           EnableColumnVirtualization="True"
           EnableRowVirtualization="True"
           FontSize="18"
           FontWeight="Bold" IsReadOnly="False"
           Margin="0,-2,10,12"
           ItemsSource="{Binding Collection}"
           Name="HotListResults"
         
           SelectionUnit="FullRow"
           ScrollViewer.CanContentScroll="True"
           ScrollViewer.HorizontalScrollBarVisibility="Auto"
           ScrollViewer.VerticalScrollBarVisibility="Auto"
           ShowGroupFooters="True"
           ToolTip="Matching Hot List Entries">
    <my:RadGridView.Columns>
        <my:GridViewDataColumn DataMemberBinding="{Binding Property1,   Mode=OneWay}" Header="Hot List"    Width="150" TextWrapping="Wrap" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Property2, Mode=OneWay}" Header="Alarm Class" Width="200" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Propert3,  Mode=OneWay}" Header="Country"     Width="100" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Property4, Mode=OneWay}" Header="State"       Width="75" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Property1,      Mode=OneWay}" Header="Plate"       Width="150" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Property3}" Header="Begin Date" Width="200" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Property1}" Header="End Date"   Width="200" />
    </my:RadGridView.Columns>
</my:RadGridView>
    </Grid>
</Window>
0
Vanya Pavlova
Telerik team
answered on 30 Dec 2011, 09:57 AM
Hi,

 


Thank you for sharing this snippet with us! I confirm that indeed there is a problem when the TextWrapping is property of a column is set to Wrap and the last row is cut to the bottom. We will do our best to provide a fix for this bug in one of our next releases. Unfortunately we are not aware of any suitable workaround which may fit to your needs. 
Please excuse us for any inconvenience caused! 



Regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Tony
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or