RadControls for ASP.NET AJAX By default all controls in Telerik RadControls for ASP.NET suite take a new polished look and feel which is consistent across the whole product line.
All resources (scripts, skins, etc) are implemented as Embedded WebResources in ASP.NET 3.x\4.x for a very easy and convenient deployment.
The only thing you now need to do is drag Telerik RadGrid from your toolbox onto your web page (no external files will be required) and Telerik
RadGrid will use its default skin.
Generally, you can change the existing grid skins by setting the Skin property to the name of the skin. See the sections below for more info.
Built-in skins
These are the skins provided by Telerik. They are embedded in the Telerik.Web.UI.dll assembly as web resources. To use a built-in skin
the user only needs to set the Skin property of the control. Built-in skins are also provided in
"C:\Program Files\Telerik\RadControls for ASP.NET AJAX Qx 20xx\Skins". The complete list of embedded skins is available
below:
Note |
|---|
With Q2 2011 release of RadControls for ASP.NET AJAX RadGrid has four new skins (Transparent + Office2010 variations). To use them you should add the Telerik.Web.UI.Skins
assembly to your Bin folder. For more information, refer to this blog post.
Since Q3 2011 all the built-in skins (except the Default one) have been relocated to the Telerik.Web.UI.Skins.dll assembly.
Also new Metro skin has been added for RadGrid.
Since Q1 2013 three new skins have been added for RadGrid (BlackMetroTouch, Glow and Silk).
|
Custom skins
These are skins created by the developer. They are not embedded so the control cannot register them automatically. If you use a custom skin you need to set the Skin property, and the EnableEmbeddedSkins property of the control to false. If you do not do so, an exception will be thrown saying that there is no embedded skin matching the Skin property:
Telerik.Web.UI.RadSlider with ID='RadSlider1' was unable to find embedded skin with name 'MySkin'. Please, make sure that you spelled the skin name correctly, or if you want to use a custom skin, set EnableEmbeddedSkins=false.
RadGrid with EnableEmbeddedSkins set to
false
and a custom skin
By default, RadGrid expects the icons for its various action buttons to be part
of the CSS skin's styles. Usually, all icons are part of a single sprite image, although
this is not a requirement. However, you can also use separate icons, which are not part of the
skin's styles. In order to set the filtering/sorting/paging/expand/collapse images and the data
editing images (edit/update/delete/add record/refresh), you can create your own images and set
the path to them through the ImagesPath property of RadGrid. Note that the
names of these images should match those for the predefined skins
in order to be referenced properly from the folder pointed through the ImagesPath property.
Below is a list of those images:
Filtering images
Filter.gif
Sorting images
SortAsc.gif
SortDesc.gif
Expand/Collapse images
SinglePlus.gif
SingleMinus.gif
Pager images
PagingFirst.gif
PagingLast.gif
PagingNext.gif
PagingPrevious.gif
Edit/Update/Delete/Insert/Cancel/Add record/Refresh images
Edit.gif
Update.gif
Delete.gif
Cancel.gif
AddRecord.gif
Refresh.gif
Reorder indicators images
MoveUp.gif
MoveDown.gif
The possible values for the Skin property are described below:
If you don't set the Skin property, the Default skin from the embedded web resources will be used.
If you have a grid that is already customized and you want to keep all your settings, you should set Skin property to an empty string (Skin="").In case you haven't defined any appearance options (styles), you will have a bare (not skinned) grid. Note, however, that in this case you will still have the default grid images (shown below).
You can use one of the predefined or your own skin. In this case you need to set
EnableEmbeddedSkins=false and define Skin/ImagesPath property values (see the previous
paragraph).
Properties (applicable when not using embedded or external skin)
The appearance of the Telerik RadGrid control may be customized by setting the style properties for the different parts of the control. The following table lists the different style properties.
Style Property | Description |
|---|
AlternatingItemStyle |
Specifies the style for alternating items in the RadGrid control.
|
EditItemStyle |
Specifies the style for the item being edited in the RadGrid control.
|
FooterStyle |
Specifies the style for the footer section in the RadGrid control.
|
HeaderStyle |
Specifies the style for the header section in the RadGrid control.
|
ItemStyle |
Specifies the style for the items in the RadGrid control.
|
PagerStyle |
Specifies the style for the page selection section of the RadGrid control.
|
SelectedItemStyle |
Specifies the style for the selected item in the RadGrid control.
|
GroupHeaderItemStyle |
Specifies the style for the group header in the RadGrid control.
|
Images
The skin's images have to be named as follows:
Image | File name |
|---|
| AddRecord.gif |
| Cancel.gif |
| Delete.gif |
| Edit.gif |
| Filter.gif |
| Refresh.gif |
| SingleMinus.gif |
| SinglePlus.gif |
| SortAsc.gif |
| SortDesc.gif |
| Update.gif |