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

Cannot filter after changing theme

3 Answers 49 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dennis Perlot
Top achievements
Rank 1
Dennis Perlot asked on 06 Mar 2012, 07:32 PM

Hi everyone,

I have two themes: light, dark.
Light is the default theme.

Here is the scenario:

  1. A page loads with a RadGridView
  2. The loaded theme is still the default.
  3. I apply filters on different columns
  4. I change the theme to dark
  5. When I try to filter on columns (by clicking on the columns filter icon) which had filters on before changing theme, the filter box doesn't open. It works nice for those columns which didn't have filters applied.

What the app does to change the theme is:

StyleManager

.SetTheme(obj, Office_SilverTheme());
where the obj is the RadGridView.

My SL version is 2011.1.419.1040.

Please see the attached image.

Thanks for any help!

 

3 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 07 Mar 2012, 08:24 AM
Hello Dennis,

Indeed, the problem can be reproduced with 2011.1.419 version. But it has been already fixed in our latest official version 2012.1.0215. Please, give it a try and let us know if you have any related problems.
 
Greetings,
Yordanka
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Dennis Perlot
Top achievements
Rank 1
answered on 07 Mar 2012, 09:43 PM

Hi Yordanka,

Is there any code workaround to solve this besides upgrading version ?

Thank you for your help.


0
Yordanka
Telerik team
answered on 08 Mar 2012, 04:24 PM
Hello Dennis,

What you can do in order to workaround the issue is to use different approach for changing the theme. It is to separate the grid in another UserControl and to recreate it after changing the theme, for example:

private void ChangeTheme_Click(object sender, RoutedEventArgs e)
        {
            StyleManager.ApplicationTheme = new Office_SilverTheme();
            this.pagePresenter.Content = new SilverlightControl1();         
        }

The SilverlightControl1 is the one contains RadGridView. Here is a link to related forum where a sample project is attached.
Following this approach you can save the applied filter descriptors before changing the theme and to restore them with applying the other theme. 

Let us know if this approach is applicable in your case or you have any difficulties implementing it.
 
Kind regards,
Yordanka
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Dennis Perlot
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Dennis Perlot
Top achievements
Rank 1
Share this question
or