Cannot filter after changing theme

4 posts, 0 answers
  1. Dennis Perlot
    Dennis Perlot avatar
    19 posts
    Member since:
    Dec 2009

    Posted 06 Mar 2012 Link to this post


    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!

     

  2. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 07 Mar 2012 Link to this post

    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 >>
  3. Dennis Perlot
    Dennis Perlot avatar
    19 posts
    Member since:
    Dec 2009

    Posted 07 Mar 2012 Link to this post


    Hi Yordanka,

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

    Thank you for your help.


  4. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 08 Mar 2012 Link to this post

    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 >>
Back to Top