Problem with slider in updatepanel

8 posts, 0 answers
  1. Christofer Hagstedt
    Christofer Hagstedt avatar
    9 posts
    Member since:
    Aug 2009

    Posted 30 Oct 2009 Link to this post

    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
  2. Christofer Hagstedt
    Christofer Hagstedt avatar
    9 posts
    Member since:
    Aug 2009

    Posted 30 Oct 2009 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Christofer Hagstedt
    Christofer Hagstedt avatar
    9 posts
    Member since:
    Aug 2009

    Posted 30 Oct 2009 Link to this post

    Even more info...

    It only occurs on Firefox.

    Does anybody have any suggestions?

    /Christofer
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 02 Nov 2009 Link to this post

    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.
  6. Christofer Hagstedt
    Christofer Hagstedt avatar
    9 posts
    Member since:
    Aug 2009

    Posted 02 Nov 2009 Link to this post

    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
  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 02 Nov 2009 Link to this post

    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.
  8. Chris Marisic
    Chris Marisic avatar
    30 posts
    Member since:
    Sep 2009

    Posted 22 Feb 2010 Link to this post

    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?
  9. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 25 Feb 2010 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017