Styling the Filter Button

4 posts, 0 answers
  1. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 09 Sep 2009 Link to this post

    I have a large website I support that is using the RadGrid's filtering functionality. Everything works perfectly minus one issue - I have a skin file defined on the site that applies a default style to all buttons. It appears the RadGrid filtering options menu (where you can select Contains, Does Not Contain, etc) is using standard buttons, but unfortunately the style I have is overriding the image icon that is normally there so I just get a blank button. Changing the button style from the skin to manual CSS classes on every page would be a huge undertaking. Is there any way I can access this button and give it a specific skin so it will ignore the CSS class being used everywhere else?

    Side question: it looks like the filtering options (Contains, etc) are Enum's but their default ToString() names are utilized so options are like DoesNotContain and such. Why wouldn't these be formatted to have spaces in them (i.e. "Does Not Contain")?
  2. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 10 Sep 2009 Link to this post

    Anyone?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 11 Sep 2009 Link to this post

    Hello Scott,

    There are several possible ways to prevent this unwanted behavior:

    - set EnableTheming="false" for the RadGrids

    - use SkinIDs for the buttons that require the theme's styles, which I see is not acceptable in this case

    - define ImagesPath for RadGrid. Setting this property will make the control use image buttons instead of regular buttons, so the theme's styles for buttons will not be applied. The ImagesPath folder must contain all the images that RadGrid uses for icons, with predefined names. They are listed here:

    http://www.telerik.com/help/aspnet-ajax/grdskins.html

    All the best,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 11 Sep 2009 Link to this post

    Perfect! I used ImagesPath and that was exactly what I was looking for.
Back to Top