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

Skin for grid not working

2 Answers 253 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Siddharth Akkinepalli
Top achievements
Rank 1
Siddharth Akkinepalli asked on 16 Feb 2009, 06:23 AM
Hi,

I created a global css file with all the necessary css for a new skin called webblue. And i gave the css class for the grid as webblue.  It works seemlessly. But when i add the line:

 <telerik:RadGrid runat="server" CssClass="RadGrid_WebBlue">  
  <PagerStyle Mode="NextPrevNumericAndAdvanced" />              
 </telerik:RadGrid>

And remove the inline css from the grid declaration while using, the skin is not rendered.

Also its not taking the pager mode from here to be applied to all the grids that i define.

Please help.

Thanks,
Sid

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 16 Feb 2009, 09:55 AM
Hi Siddharth,

Here are some guidelines on your issues:

1. CSS skin not applied

First of all, setting a CssClass of type "RadGrid_Something" is not allowed - you should not use "RadGrid_" in custom CSS classes.

If you don't set the Skin property for RadGrid, it is rendered with the Default skin. If your CSS uses different skin suffix (e.g. WebBlue), you need to set the RadGrid skin to WebBlue like this:

<telerik:RadGrid  Skin="WebBlue"  EnableEmbeddedSkins="false"  />

Setting a Skin property "WebBlue" will make RadGrid render a CSS class "RadGrid_WebBlue" automatically. Please note that CSS class names are case-sensitive.


2. PageStyle not applied

If PagerStyle is set to RadGrid and MasterTableView, the second one takes precedence. Probably you have PagerStyle-Mode define in the MasterTableView, so please modify the declaration in the theme skin file like this:

<telerik:RadGrid runat="server">  
    <MasterTableView>
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />             
    </MasterTableView> </telerik:RadGrid>

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Siddharth Akkinepalli
Top achievements
Rank 1
answered on 16 Feb 2009, 10:07 AM
Hi Dimo,

Thats worked like magic!, Thanks for the help.

Sid.
Tags
Grid
Asked by
Siddharth Akkinepalli
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Siddharth Akkinepalli
Top achievements
Rank 1
Share this question
or