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

Slider Not Picking Up Skin From Web.config

5 Answers 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Donald Miller
Top achievements
Rank 1
Donald Miller asked on 19 Jun 2008, 02:00 PM
I love the slider control as a pager but I am hiving an issue with it picking up the skin. If I set the skin in the page or in a custom skin file it works fine but if I set it over all for the site in the web.config file the slider does not pick up the skin change. The grid does but the slider page control does not. Anything else I need to set or check or is this just a bug?

5 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Jun 2008, 02:08 PM
Hi Donald,

When RadSlider is used as a pager for RadGrid, it is a subordinate control of RadGrid. In this case, the slider's Skin property is inherited from the RadGrid's Skin property and the slider does not read the web.config setting at all. This is an expected behavior and all RadControls' which are used internally by RadGrid (e.g. RadInput, RadMenu, etc) behave in the same manner.

If you want the pager slider's skin to be different from that of RadGrid, you should set it explicitly. I am sorry about this inconvenience.

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Donald Miller
Top achievements
Rank 1
answered on 20 Jun 2008, 02:24 PM
I don't want the skin of the slider to be different. I want it to be the same as the grid but it does not inherit that setting when it is made in the web config file. The other subordinate controls of the grid do pick up the setting such as the toolbar I am using as a command template or the labels being used in templated columns.
0
Accepted
Dimo
Telerik team
answered on 20 Jun 2008, 03:54 PM
Hello Donald,

Now I understand. Well, this definitely looks like a bug and I will notify the developers. Your Telerik points have been updated for bringing this issue to our attention.

If you don't want to hardcode any skins outside web.config, you can set the slider pager's skin by directly using the configuration setting:

Markup

<telerik:RadGrid ID="RadGrid1" OnItemCreated="RadGrid1_ItemCreated"
    <MasterTableView /> 
    <PagerStyle Mode="Slider" /> 
</telerik:RadGrid> 


C#

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    if (e.Item is GridPagerItem && (sender as RadGrid).PagerStyle.Mode == GridPagerMode.Slider) 
    { 
        ((e.Item as GridPagerItem).Controls[0].Controls[1] as RadSlider).Skin = ConfigurationManager.AppSettings["Telerik.Skin"]; 
    } 


I hope this is OK for you.


Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Dimo
Telerik team
answered on 02 Jul 2008, 02:41 PM
Hello,

The issue is now resolved and changes will take effect in our next release.

Regards,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Donald Miller
Top achievements
Rank 1
answered on 03 Jul 2008, 02:05 PM
OK, great. Thx.
Tags
Grid
Asked by
Donald Miller
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Donald Miller
Top achievements
Rank 1
Share this question
or