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

Problem with slider in updatepanel

7 Answers 150 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Christofer Hagstedt
Top achievements
Rank 1
Christofer Hagstedt asked on 30 Oct 2009, 11:15 AM
Hi,

I have 3 radsliders inside an update panel. The asp panel that contains the sliders is initially hidden and is show thru an update of the update panel. On showing the sliders they do not display properly and they do not function as intended. Se my screendump for more info.

I use a custom skin for the sliders but the same problem occurs even if I run the default embeded skin.

I have tried to run the repaint method that you need to use when the sliders are in an hidden html element.

Thanks!

/Christofer

7 Answers, 1 is accepted

Sort by
0
Christofer Hagstedt
Top achievements
Rank 1
answered on 30 Oct 2009, 11:30 AM
Some more info.

They do work when running the app locally in VS 2008. I run c# 3.5 and the built in webserver.

/Christofer
0
Christofer Hagstedt
Top achievements
Rank 1
answered on 30 Oct 2009, 11:43 AM
Even more info...

It only occurs on Firefox.

Does anybody have any suggestions?

/Christofer
0
Tsvetie
Telerik team
answered on 02 Nov 2009, 01:38 PM
Hello Christofer,
In order to be able to help you, I will need a running test project that demonstrates this problem as well as detailed reproduction steps. You will have to open a new support ticket in order to attach the files of the project.

In the meantime, you can try registering not only the skin-specific CSS file yourself, but the base style sheet as well:
<link href='<%= Page.ClientScript.GetWebResourceUrl(typeof(RadSlider), "Telerik.Web.UI.Skins.Slider.css") %>' 
    rel="stylesheet" type="text/css" /> 
<link href='<%= Page.ClientScript.GetWebResourceUrl(typeof(RadSlider), "Telerik.Web.UI.Skins.Vista.Slider.Vista.css") %>' 
    rel="stylesheet" type="text/css" /> 

Please note that in this case you need to set not only EnableEmbeddedSkins="false", but EnableEmbeddedBaseStylesheet="false" as well.

Greetings,
Tsvetie
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
Christofer Hagstedt
Top achievements
Rank 1
answered on 02 Nov 2009, 03:29 PM
Hi,

Registring the base style sheet in my page solved the issue.

Thanks!

Do you have any idea as to why this might be causing a problem? I use lots of radsliders in this project but only these in an update panel. And it works fine in all web browsers but Firefox.

Thanks again for solving this problem!

/Christofer
0
Tsvetie
Telerik team
answered on 02 Nov 2009, 04:26 PM
Hi Christofer Hagstedt,
I have seen a problem that resembles the one in the screenshot. It manifestes in one particular scenario - when you do not have a RadSlider control initially on your page and you load a slider control with AJAX. The problem in this case is that the client code for the slider is executed before the CSS files of the slider are loaded. This happens because the page is updated synchronously when it is loaded for the first time and after postback and asynchronously, after AJAX request. That is why there is no way to ensure that the skin of the slider will be loaded by the time its client-side code is executed.

You might ask why the slider needs its skin files in order to render correctly - the reason for that is because the slider creates its HTML and calculates the size of its elements on the client. Some sizes - for example the size for the increase/decrease handles are set in the CSS of the skin of the slider. In case those handles do not have their correct size by the time the slider tries to calculate the size of its track element, for example, the calculated size is incorrect.

We will try to fix this in the code of the RadSlider for a future release.

Best wishes,
Tsvetie
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
Chris Marisic
Top achievements
Rank 1
answered on 22 Feb 2010, 09:58 PM
Tsvetie

I encountered this problem today with the most recent 2009Q3 release and if I set EnableEmbeddedSkins="false" and EnableEmbeddedBaseStylesheet="false" on my sliders they wouldn't even render mark up. However adding only the GetWebResourceUrl calls and leaving Skin="Windows7" on my sliders resolved the issue for me in FF 3.6, IE 6,7 and 8.

Is there a way to use the CSS files from the Telerik CDN for this instead of the WebResource.axd files for this?
0
Tsvetie
Telerik team
answered on 25 Feb 2010, 01:12 PM
Hello Chris Marisic,
I am not quite sure why the code with the EnableEmbeddedBaseStylesheet=false and EnableEmbeddedSkins="false" did not work. In case you open a new support ticket and send me a running test project, I can check what causes the problem.

Regarding your question about whether you can the CSS files from the Telerik CDN - no, you cannot.

All the best,
Tsvetie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Slider
Asked by
Christofer Hagstedt
Top achievements
Rank 1
Answers by
Christofer Hagstedt
Top achievements
Rank 1
Tsvetie
Telerik team
Chris Marisic
Top achievements
Rank 1
Share this question
or