Unable to use skin

4 posts, 0 answers
  1. Per Granaune
    Per Granaune avatar
    11 posts
    Member since:
    Feb 2010

    Posted 14 Dec 2010 Link to this post

    I'm going ever so slightly mad.

    I'm using Telerik Q1 2010 (Telerik.Web.UI.dll version 2010.1.519.35) in a EpiServer solution (CSM5).

    Several userControls (generic controls - not EPiServer controls) use one or more Telerik components.
    I've made custom skins, which are referenced in the MasterPage file.

    The first of two problems:

    I'm totally uanble to make a RadGrid use a new skin. It's referenced in the MasterPage file right next to the old skin:

    <link href="~/Templates/Public/Styles/Grid.Different.css" rel="stylesheet" type="text/css" runat="server"/>
    <link href="~/Templates/Public/Styles/Grid.SpotPrice.css" rel="stylesheet" type="text/css" runat="server"/>

    When set Skin="Different" EnableEmbeddedSkins="false", the grid is rendered completely without any formatting.
    Set back to Skin="SpotPrice" EnableEmbeddedSkins="false", everything works.

    Grid.Different.css has currently the exact same content as Grid.SpotPrice.css, with the exception of the internal naming:
    ".RadGrid_Different .rgMasterTable", etc.

    Why is it completely impossible to make the radgrid find the new skin/css???
    It made no difference to reference the css in the page in which the user control is referenced, compared to referencing
    it in the master page.

    The second problem:

    Even if I settle for using the old skin - because at least I'm able to reference it - I'm unable to format everything correctly.

    More precisely, the section

    .RadGrid_SpotPrice .rgHeader,
    .RadGrid_SpotPrice th.rgResizeCol

    allows me to set the background and font-size of the header row of the grid. However, I can't find a way to set the font-weight.
    It is completely ignored, and Firebug lists this as the top level css formatting:

    I'm unable to find where this css class - or indeed any "font-weight: normal" anywhere, but it's overriding every attempt I make at controlling the text of the header cells. Firebug lists the location of this css data as "http://localhost:1876/WebResource.axd?d=xK61nSE_t_j8tJQDQ5B9RsXqY0GVn0S9b4vKwY1ZuXsDXjk3WXwX8XeOyen9WIl-rEWY2bbVk4m7l4v0GOCzBU6ybV7OhG1m_uq5UNg9v2wqqGtQE5lyh_6GaRuspiuPnKAyWA2&t=634097737580000000".

    What's going on here?

    It should really be simple - make a new skin, reference it, and format it.

    http://www.telerik.com/help/aspnet-ajax/grdcreatingnewskins.html or http://demos.telerik.com/aspnet-ajax/grid/examples/styles/headerfooterpagerstyles/defaultcs.aspx doesn't use any ".Controltype class prefix" such as ".RadGrid", but it can't have anything to do
    with anything, since both of my CSS files use the same prefixes.

    Any ideas? Anyone?
  2. Craig Mellon
    Craig Mellon avatar
    53 posts
    Member since:
    May 2005

    Posted 14 Dec 2010 Link to this post

    If the skin is ignoring style changes just use the important rule:

    Pretty sure I know why your custom skin isn't been detected, give me 5 minutes I'll look through a project I had this issue with.

    Ok one issue I had changing to a custom skin was the image paths referenced in the css, can you check these?
  3. Per Granaune
    Per Granaune avatar
    11 posts
    Member since:
    Feb 2010

    Posted 14 Dec 2010 Link to this post

    Hm. Image paths? Interesting.

    Both the CSS files lie in the same place, and reference the same images, in the subfolder "Grid".
    So both or neither of the CSS files should work.

    Thought this was the solution - typical...
  4. Per Granaune
    Per Granaune avatar
    11 posts
    Member since:
    Feb 2010

    Posted 14 Dec 2010 Link to this post

    Good - I managed to control the font-weight by putting

    font-weight: bold !important;


    ".RadGrid_SpotPrice .rgHeader,
    .RadGrid_SpotPrice .rgHeader a"

    while it didn't work in

    ".RadGrid_SpotPrice .rgHeader,
    .RadGrid_SpotPrice th.rgResizeCol"
Back to Top