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

[Solved] Setting Theme in Loading event breaks grouping

5 Answers 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian Lam
Top achievements
Rank 1
Brian Lam asked on 16 Dec 2010, 11:20 PM
Hi,

My application needs to set RadGridView's Theme dynamically after the Loaded event, but doing so breaks the GridView when it's in a RadWindow. The column headers become undraggable. This behavior only started happening in the Q3 2010 release; it worked fine in Q2 2010. Is this a known issue?

Here's some sample code that demonstrates the bug:

public MainPage()
{
    InitializeComponent();
 
    var window = new RadWindow();
    window.Show();
 
    var gridView = new RadGridView();
    gridView.Loaded += gridView_Loaded;
    window.Content = gridView;
 
    var dummyData = new List<int>();
    for (var i = 0; i < 100; i++)
    {
        dummyData.Add(i);
    }
    gridView.ItemsSource = dummyData;
 
}
 
private void gridView_Loaded(object sender, RoutedEventArgs e)
{
    StyleManager.SetTheme(sender as RadGridView, new Office_BlueTheme());
}

5 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 17 Dec 2010, 02:20 PM
Hello Brian,

 
Unfortunately I was not able to reproduce the issue you described, everything works fine on my end.
Can you please send us a small application via support ticket that demonstrates such a behavior?

Best wishes,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Brian Lam
Top achievements
Rank 1
answered on 17 Dec 2010, 03:45 PM
I opened support ticket 377399, and attached a sample application there.
0
Vanya Pavlova
Telerik team
answered on 20 Dec 2010, 05:37 PM
Hello Brian,

 
Thank you for sending this project. We will investigate what might be causing this issue and as a possible workaround I would suggest you to use the snippet below:

public MainPage()
      {
          InitializeComponent();
 
          var window = new RadWindow();
          window.Show();
 
          var radGrid = new RadGridView();
          StyleManager.SetTheme(radGrid, new Office_BlueTheme());
          window.Content = radGrid;
 
          var dummyData = new List<int>();
          for (int i = 0; i < 100; i++)
          {
              dummyData.Add(i);
          }
          radGrid.ItemsSource = dummyData;
      }


Regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Brian Lam
Top achievements
Rank 1
answered on 20 Dec 2010, 09:08 PM
Hi Vanya,

I need to set the GridView's Theme dynamically based on values that aren't available until the Loaded event, so that workaround won't work for me. I just simplified the code in my example to easily reproduce the problem.
0
Accepted
Yavor Georgiev
Telerik team
answered on 21 Dec 2010, 12:43 PM
Hello Brian Lam,

 We have found the cause of this issue and the fix will be part of our Service Pack release, which should be out in the next few days.

Greetings,
Yavor Georgiev
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
Brian Lam
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Brian Lam
Top achievements
Rank 1
Yavor Georgiev
Telerik team
Share this question
or