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

Pagerstyle not picking up CSS

5 Answers 185 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Courtenay
Top achievements
Rank 1
Courtenay asked on 06 Oct 2009, 01:02 AM
Hi there,

im trying to add a css class to my pager style but it always just reverts to the orginal GridPager_Default.

here is my code:

<telerik:RadGrid ID="grdProperties" runat="server" GridLines="None" AllowPaging="True" 
                                            AllowSorting="True" AutoGenerateColumns="False" PageSize="3" OnNeedDataSource="grdProperties_NeedDataSource" 
                                            OnItemDataBound="grdProperties_ItemDataBound" EnableEmbeddedSkins="false">  
                                            <PagerStyle ShowPagerText="false" VerticalAlign="Middle" ForeColor="White" CssClass="ProfilePager_Default" Mode="NextPrevAndNumeric" EnableSEOPaging="True" PrevPageImageUrl="/surf4property/images/btnPrevious.png" NextPageImageUrl="/surf4property/images/btnNext.png"></PagerStyle> 
 
                                            <MasterTableView NoMasterRecordsText="No Properties to display">  
 
Number of columns.....  
 
</Columns> 
                                                <RowIndicatorColumn Visible="False">  
                                                    <HeaderStyle Width="20px"></HeaderStyle> 
                                                </RowIndicatorColumn> 
                                                <ExpandCollapseColumn Visible="False" Resizable="False">  
                                                    <HeaderStyle Width="20px"></HeaderStyle> 
                                                </ExpandCollapseColumn> 
                                                <EditFormSettings> 
                                                    <PopUpSettings ScrollBars="None"></PopUpSettings> 
                                                </EditFormSettings> 
                                            </MasterTableView> 
                                        </telerik:RadGrid> 

In the above example i try to create a new CSSClass but it doesnt work? it keeps using the original GridPager_Default

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 Oct 2009, 09:25 AM
Hello Courtenay,

Try adding the !important keyword to the css class settings as shown below and check if it helps:
css:
 .ProfilePager_Default 
    { 
       background-color:blue !important; 
        
    } 

The !important keyword is used so that the corresponding appearance setting will dominate over the style specified in the Styles.css file of the chosen skin.

Thanks
Princy.
0
Courtenay
Top achievements
Rank 1
answered on 06 Oct 2009, 09:56 PM
Hi there,

thanks for your reply. unfortunately that didnt work, it still reverts to the actual class GridPager_Default.

The grid actually has embeddedskins to false and i dont want the grid to use any skins.

Anything else we could try?

Court
0
Dimo
Telerik team
answered on 07 Oct 2009, 07:52 AM
Hi Courtenay,

I can't reproduce the described behavior with the latest RadGrid version. Which version are you using?

You can try setting a custom CSS class to the RadGrid control itself and use it like this:

.MyCustomGridClass  .GridPager_Default
{
       background-color: blue ;
}


Regards,
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.
0
Courtenay
Top achievements
Rank 1
answered on 11 Oct 2009, 12:18 AM
Hi Dimo,

That seemed to work.

Im currently using the 2008.1.619.20. I dont seem to be able to upgrade to the latest version however, should i be able to?
0
Sebastian
Telerik team
answered on 12 Oct 2009, 09:25 AM
Hello Courtenay,

I checked your account and it indicates that you are added as a developer to a license entitled to get the Q1 2009 version of our controls. To get a hold on the latest version of the suite, you will need to perform an upgrade following the directions from here:

http://www.telerik.com/purchase/upgrades.aspx

Kind regards,
Sebastian
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.
Tags
Grid
Asked by
Courtenay
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Courtenay
Top achievements
Rank 1
Dimo
Telerik team
Sebastian
Telerik team
Share this question
or