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

RadGridView grouping issues

5 Answers 280 Views
GridView
This is a migrated thread and some comments may be shown as answers.
tjuncewicz
Top achievements
Rank 1
tjuncewicz asked on 07 Jul 2011, 10:48 PM
We recently "upgraded" to WPF 3.5 Q1 2011.  We have a RadGridView with grouping that cuts off the last detail row in each group.  In most cases only a few pixels of the last row in each group are visible.  This used to work in previous release and latest hotfixes did not help. 

Here is our XAML:
<tel:RadGridView x:Name="ListsGV" Grid.Row="2" ItemsSource="{Binding EditFormViewModelCollection}"
        IsReadOnly="True" SelectedItem="{Binding CurrentEditFormViewModel}"
        PreviewMouseDoubleClick="gridView_PreviewMouseDoubleClick"
        HeaderRowStyle="{StaticResource HeaderStyle}"
        CanUserSortColumns="False">
 
  <prism:CommandBehaviorCollection.Behaviors>
    <prism:BehaviorBinding Event="MouseDoubleClick" Command="{Binding TableSelectedDoubleClickCommand}" CommandParameter="{Binding ElementName=ListsGV, Path=CurrentItem}" />
  </prism:CommandBehaviorCollection.Behaviors>
 
  <tel:RadGridView.GroupDescriptors>
    <tel:GroupDescriptor Member="CurrentList.SystemModule" />
  </tel:RadGridView.GroupDescriptors>
  <tel:RadGridView.GroupHeaderTemplate>
    <DataTemplate>
      <TextBlock Text="{Binding Header.Description}" Margin="1,0,0,0" />
    </DataTemplate>
  </tel:RadGridView.GroupHeaderTemplate>
 
  <tel:RadGridView.Columns>
    <tel:GridViewDataColumn Header="Description" DataMemberBinding="{Binding CurrentList.Description}"
        HeaderCellStyle="{StaticResource HeaderCell}" MinWidth="300" />
    <tel:GridViewDataColumn Header="Shared Operations" DataMemberBinding="{Binding CurrentList.SharedOperation}"
        HeaderCellStyle="{StaticResource HeaderCell}" Width="*"/>
  </tel:RadGridView.Columns>
</tel:RadGridView>

5 Answers, 1 is accepted

Sort by
0
tjuncewicz
Top achievements
Rank 1
answered on 07 Jul 2011, 11:08 PM
I should add that this behavior appears on a 64-bit Windows 7 OS.  Another developer with 32-bit WIndows 7 does NOT have this issue.

EDIT:  Appears that the last row of a RadGridView is getting cut off occasionally as well, even with no grouping.
0
Ivan Ivanov
Telerik team
answered on 11 Jul 2011, 09:46 AM
Hi Tjuncewicz,

I have tried to reproduce  the described issue with the following configuration: RadControls WPF 3.5 2011.1.315 (Q1 2011), 64 bit Windows 7 OS but unfortunately I have not faced such visual artifacts. I would kindly ask you to confirm whether this is the version that you are currently using.  I have attached my test project for your reference. Would you please, send us a simple demo project that reproduces this problem, in order to help us provide better support to your case? Thank you.

All the best,
Ivan Ivanov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Craig
Top achievements
Rank 1
answered on 19 Aug 2011, 05:08 AM
Hi Ivan,

I was able to reproduce the 'even with no grouping' issue in RadControls WPF 4.0, 2011.2.712 release. I have encounted this issue in an application I am working on at the moment and I could reproduce it your test project by changing the xaml for the RadGridView to:

<telerik:RadGridView x:Name="radGridView">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" />
          
        <telerik:GridViewColumn>
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}"  Margin="5"/>
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
        </telerik:GridViewColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

This issue seems to come and go as we resize a window - sometimes the last row is fully visible, sometimes it isnt at all and sometimes there is a blank row below the last row.

It also seems to depend on how much margin we put on the control in the cell template - I'm not sure if its only the margin property or if it is just the total size of control that is inside the template. In the application I am working on we have RadButtons in our cell templates and they only require 2 margin to start causing issues, where I had to put 5 on TextBlock to reproduce it.

We are also on a 64 bit version of Windows (Windows Server 2008 R2).

Thanks,

Craig
0
Ivan Ivanov
Telerik team
answered on 22 Aug 2011, 03:42 PM
Hello Craig,

This issue is related to the fact that margins and paddings are not taken into account on the layout Measure pass. Unfortunately, we have no workaround for this framework problem. Would you please shed some more light on your requirements towards the cell templates, so that we could think of some solution that is compliant with this case?

Regards,
Ivan Ivanov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Craig
Top achievements
Rank 1
answered on 23 Aug 2011, 11:48 PM
Hi Ivan,

We currently have buttons in each row for a sort of 'quick action against this record'.  Our button styles at the moment include lots of padding/margins as they're the same used elsewhere in our app. We can probably just make a style for the buttons which will go in grids with less padding/margs if it is a problem with how the framework handles layout.

Thanks,

Craig

Tags
GridView
Asked by
tjuncewicz
Top achievements
Rank 1
Answers by
tjuncewicz
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Craig
Top achievements
Rank 1
Share this question
or