RadGrid not Using Custom Skin

10 posts, 0 answers
  1. Paul
    Paul avatar
    23 posts
    Member since:
    Sep 2006

    Posted 04 Aug 2011 Link to this post

    Hi,

    I have a Radgrid on a page, and I have implemented a custom skin.
    <telerik:RadGrid ID="JobsGrid" runat="server" AutoGenerateColumns="False"
       CellSpacing="0" AllowSorting="True"
       EnableEmbeddedSkins="False" GroupingEnabled="False" SkinID="XLogixBlue" >
       <ClientSettings>
         <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />

    The page is derived from a Master page, and all the skins css files are included on the Master page.
    However, when the page is rendered, the source does not reference my custom skin, but the default skin instead, as below
        <div id="GridContainer" style="position: absolute; width: 920px; height: 400px; left: 10px; top: 10px">
      
          <div id="ctl00_maincontentarea_JobsGrid" class="RadGrid RadGrid_Default">
      
    <table cellspacing="0" class="rgMasterTable" id="ctl00_maincontentarea_JobsGrid_ctl00" style="width:100%;table-layout:auto;empty-cells:show;">
        <colgroup>
            <col  />
            <col  />
            <col  />
            <col  />
            <col  />

    There is a Menu on the same page which is working fine.
    I have tried including the CSS files directly within the child page, and that did not help either.

    I am using the Q2 2011 release.

    Thankyou

    Paul
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Aug 2011 Link to this post

    Hello Paul,

    Check the following help documentation which describes about creating a CustomSkin.
    Modifying existing skins/creating new skins.
    For further information you can check the following demo as well.
    Grid / Custom Skin.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul
    Paul avatar
    23 posts
    Member since:
    Sep 2006

    Posted 04 Aug 2011 Link to this post

    Hi Shinu,

    I created the skin using the visual style builder, and have not modified it, so I would expect it to be OK.

    The bit that is confusing me though, is that if you look at the html generated, the class of the grid is radgrid_default, and I would expect it to be radgrid_xlogixblue.
    I can't find any settings that would seem to determine this apart from the skin name.


    Paul
  5. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 04 Aug 2011 Link to this post

    Hello,

    Please check that are you applying EnableEmbeddedSkins="true" for radgird. (in skin file).

    for example : inside App_theme/skinfile.skin
    <telerik:RadGrid EnableEmbeddedSkins="true" runat="server' />

    or

    check JobsGrid.Skin name in page_prerender and grid_prerender event.

    let me know if any concern.
     
    Thanks,
    Jayesh Goyani
  6. Paul
    Paul avatar
    23 posts
    Member since:
    Sep 2006

    Posted 04 Aug 2011 Link to this post

    Hi Jayesh,

    I am not using themes, just a custom skin.
    I have included all the css style sheets for the skin.
    Also, all the documentation I can find tells me that EnableEmbeddedSkins should be False, since I am using a custom skin.

    Thank you

    Paul
  7. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 05 Aug 2011 Link to this post

    Hello paul,

    Please upload your project or code so we should find the problem/issue in your code.

    Thanks,
    Jayesh Goyani
  8. Paul
    Paul avatar
    23 posts
    Member since:
    Sep 2006

    Posted 05 Aug 2011 Link to this post

    Hi Jayesh,

    Sorry for the delay, I have been creating a project that does not need all our databases and other dependancies to show the problem.

    I could not upload the file, so you can get the source here: http://www.sewwhat.gb.com/Paul/testsite.zip

    As you will see, the grid is set to use the XlogixBlue skin, but the HTML that is generated when you run the site has the class set to Radgrid_Default - I expected this to be Radgrid_XlogixBlue


    Thank you

    Paul
  9. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 05 Aug 2011 Link to this post

    Hello  Paul,

    I found the temporary solution for your project because it works perfectly but this is not the proper way to solve this issue.

    Write below code in test.aspx.cs.

    protected void Page_PreRender(object sender, EventArgs e)
       {   
           JobsGrid.Skin = "XLogixBlue";
       }


    Thanks,
    Jayesh Goyani
  10. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 05 Aug 2011 Link to this post

    hello paul,

    please set/add below tag in web.config.

    <appSettings>
          <add key="Telerik.Grid.Skin" value="XLogixBlue"/>
         <add key="Telerik.Grid.EnableEmbeddedSkins" value="false"/>
    </appSettings>


    let me know its working or not ?

    Thanks,
    Jayesh Goyani
  11. Paul
    Paul avatar
    23 posts
    Member since:
    Sep 2006

    Posted 05 Aug 2011 Link to this post

    Hi Jayesh,

    That is working now thank you.

    I'm at a loss to understand why this is necessary though, as all the older versions of the controls work fine just by setting it's property.


    Paul
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017