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

RadSkinManager Targetcontrols code behind issue

1 Answer 32 Views
SkinManager
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 1
Jacques asked on 20 Feb 2015, 11:46 AM
Hi there,

I hope somebody can help me with this one.

I want to change the skin of a particular type of controls by setting the TargetControls collection of the RadSkinManager in code behind.
I use the following code:

protected void cbSkins_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs )
        {     
      RadSkinManager1.TargetControls.Clear();
      string skinName = e.Text;
RadSkinManager1.TargetControls.Add(Telerik.Web.UI.ControlTypeToApplySkin.RadButton, skinName);
        }

The first time the event is hit the skin of the RadButton is changed on the page, which is OK.
After the second time the event is hit the skin of the RadButton is not changed.

Does anybody know why the skin is only changed the first time the event is hit?

Regards,

Marcel

1 Answer, 1 is accepted

Sort by
0
Accepted
Maria Ilieva
Telerik team
answered on 25 Feb 2015, 12:15 PM
Hi Jacques,

It is too late to use the SelectedIndexChange event to modify the skin in the page lifecyle. Therefore the required functionality should be achieved by using Skin Chooser of the Skin Manager for this purpose.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
SkinManager
Asked by
Jacques
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or