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

RadGrid not Using Custom Skin

9 Answers 157 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 04 Aug 2011, 12:07 PM
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

9 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Aug 2011, 12:55 PM
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.
0
Paul
Top achievements
Rank 1
answered on 04 Aug 2011, 01:02 PM
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
0
Jayesh Goyani
Top achievements
Rank 2
answered on 04 Aug 2011, 01:14 PM
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
0
Paul
Top achievements
Rank 1
answered on 04 Aug 2011, 01:21 PM
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
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Aug 2011, 08:52 AM
Hello paul,

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

Thanks,
Jayesh Goyani
0
Paul
Top achievements
Rank 1
answered on 05 Aug 2011, 01:26 PM
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
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Aug 2011, 01:53 PM
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
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Aug 2011, 01:59 PM
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
0
Paul
Top achievements
Rank 1
answered on 05 Aug 2011, 02:23 PM
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
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Paul
Top achievements
Rank 1
Jayesh Goyani
Top achievements
Rank 2
Share this question
or