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

Sknning Radgrid :(

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 2
Richard asked on 11 Nov 2009, 03:39 PM
Hi,

I'm finding skinning RadGrid very difficult. 
I've read through : http://www.telerik.com/help/radcontrols/prometheus/?grdCreatingNewSkins.html
but it does not cover how to replace the Sort ASC/DSC icons through a CSS stylesheet skin.

1.  Can anyone please help me with that?  At the moment, I've had to apply the custom ASC/DSC image icons to each one of my columns from within the grid control properties- this isn't practical.

I remember that in the older versions of Telerik control, we could simply drop in a SKIN folder and replace the images in the folder to custom ones, as well as edit/copy the existings skins and use those as templates.  With the newer telerik version, is there a template that exists in which covers all elements of the skinning similar to the way we used to do it?

2.  A further issue I am struggling to resolve is Change Pager Text Format.
By default, the format is Change page: {4}  Displaying page {0} of {1}, items {2} to {3} of {5}.
Which places Change page: {4} in the <DIV class="PagerLeft_New"> and Displaying page {0} of {1}, items {2} to {3} of {5}.
in the <DIV class="PagerRight_New">. 

I've tried moving swapping around this text so that the format is  Displaying page {0} of {1}, items {2} to {3} of {5}. &nbsp;Change page: {4}  but unfortunately it all just ends up in one DIV (the PagerLeft_New) no matter what I do.  Is there any way of seperating this back when I custmoise this property?

Thanks
R



1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Nov 2009, 08:16 AM
Hi Richard Leung,

Please refer to the following help article on RadGrid CSS sprites.

http://www.telerik.com/help/aspnet-ajax/css-sprites.html

If you don't want to use background images for the RadGrid icons, you can set the ImagesPath property and place all icon images in that location, similarly to the old ASP.NET RadGrid. The images must have specific names:

http://www.telerik.com/help/aspnet-ajax/grdskins.html

As for the pager, if you want to reverse the left and right containers, there is another way to do that. Judging by the CSS classes that you mention, you are using RadControls Q3 2008 or older. Here is an example how to switch the pager layout with CSS:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
<head runat="server">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>RadControls for ASP.NET AJAX</title>
<style type="text/css">
 
.ReversedPager .PagerLeft_Default
{
    float:right;
}
.ReversedPager .PagerRight_Default
{
    float:left;
}
 
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<telerik:RadGrid
    ID="RadGrid1"
    runat="server"
    Skin="Default"
    AllowPaging="true"
    CssClass="ReversedPager"
    OnNeedDataSource="RadGrid_NeedDataSource">
    <PagerStyle Mode="NextPrev" />
</telerik:RadGrid>
 
</form>
</body>
</html>



All the best,
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.
Tags
Grid
Asked by
Richard
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or