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

RadGridView - Bug when collapsing bottommost groups.

3 Answers 29 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 02 Dec 2011, 06:52 PM

Hello,

Below you will see a simple demo project illustrating my case.  I am also able to get almost similar behavior using the demo site.

1) Load a RadGridView with around 100 rows of data. (Not sure at what point this becomes an issue, but we noticed it here).
2) Group by one of the columns so you get some nicely spaced groupings.  I had 5 groups of 20 records each.
3) Scroll to the bottom of the RadGridView.
4) Collapse the bottom most group.

You should see some large white spaces in the grid, if there is any data left at all.  On the demo site, it seems like sometimes the data will eventually show up.  Sometimes not.

I am using the latest dll's - q3 build 1129.

<UserControl    x:Class="SilverlightApplication85.MainPage"
>
  <Grid x:Name="LayoutRoot" Background="White">
    <telerik:RadGridView ItemsSource="{Binding}" AutoGenerateColumns="False" AutoExpandGroups="True">
      <telerik:RadGridView.GroupDescriptors>
        <telerik:GroupDescriptor Member="property2" />
      </telerik:RadGridView.GroupDescriptors>
      <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="p1" DataMemberBinding="{Binding property1, Mode=TwoWay}" />
        <telerik:GridViewDataColumn Header="p2" DataMemberBinding="{Binding property2, Mode=TwoWay}" />
        <telerik:GridViewDataColumn Header="p3" DataMemberBinding="{Binding property3, Mode=TwoWay}" />
        <telerik:GridViewDataColumn Header="p4" DataMemberBinding="{Binding property4, Mode=TwoWay}" />
      </telerik:RadGridView.Columns>
    </telerik:RadGridView>
  </Grid>
</UserControl>
using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
 
namespace SilverlightApplication85
{
  public partial class MainPage : UserControl
  {
    public MainPage()
    {
      InitializeComponent();
      this.Loaded += new RoutedEventHandler(MainPage_Loaded);
    }
 
    void MainPage_Loaded(object sender, RoutedEventArgs e)
    {
      ObservableCollection<MyDataObject> list = new ObservableCollection<MyDataObject>();
      for (int i = 1; i <= 100; i++)
      {
        MyDataObject mdo = new MyDataObject()
        {
          property1 = Guid.NewGuid().ToString(),
          property2 = (i % 5).ToString(),
          property3 = (i % 10).ToString(),
          property4 = (i % 20).ToString()
        };
        list.Add(mdo);
      }
 
      this.DataContext = list;
    }
  }
 
  public class MyDataObject
  {
    public string property1 { get; set; }
    public string property2 { get; set; }
    public string property3 { get; set; }
    public string property4 { get; set; }
  }
}

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 05 Dec 2011, 04:16 PM
Hello Rob,

 Indeed you are right. I have reproduced this issue on my end.
Actually such a problem was already logged into our system for fixing. You could follow its progress here.

Kind regards,
Didie
the Telerik team

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

0
Rob
Top achievements
Rank 1
answered on 21 Dec 2011, 03:56 PM
Do you happen to know of a workaround I can apply until the fix is available?  An UpdateLayout() or Rebind() maybe?
0
Dimitrina
Telerik team
answered on 22 Dec 2011, 11:02 AM
Hello,

As a workaround you could call the InvalidateMeasure() method on GroupRowIsExpandedChaned event:

private void dataGrid_GroupRowIsExpandedChanged(object sender, Telerik.Windows.Controls.GridView.GroupRowEventArgs e)
{
        dataGrid.InvalidateMeasure();
}

Does this help?

Regards,
Didie
the Telerik team

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

Tags
GridView
Asked by
Rob
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Rob
Top achievements
Rank 1
Share this question
or