Set slider value server side

9 posts, 0 answers
  1. nowickim
    nowickim avatar
    16 posts
    Member since:
    Aug 2007

    Posted 11 Apr 2008 Link to this post

    Is it possible to set the RadSlider VALUE server side?  I know how to do it client-side but I have a need to do it via server.

    THANKS
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 15 Apr 2008 Link to this post

    Hi nowickim,

    Yes, it is possible to set the RadSlider value server-side and this should be done through its Value property as shown below:

    ASPX:

        <telerik:RadSlider ID="RadSlider1" runat="server" /> 


    server code:

     RadSlider1.Value = 90



    All the best,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. nowickim
    nowickim avatar
    16 posts
    Member since:
    Aug 2007

    Posted 15 Apr 2008 Link to this post

    OK, I'm sorry but I should have expanded on my post before sending it.  Setting it server-side as below works just fine.  But what I'm trying to do is change the value in response to an AJAX Request (using Prometheus AjaxManager). 

    So in my page, I have another control that has a client side event.  In that client side event I'm doing this:

    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");     
    ajaxManager.ajaxRequest("ResetZoom");   

    Then server side when I get taht AjaxRequest, I'm trying to set the slider Value.  If I set a breakpoint inside of AjaxRequest I can see that Value changes successfully but the change doesn't stick.

    What am I doing wrong?
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Apr 2008 Link to this post

    Hello nowickim,

    I assume from your explanation that you update the RadSlider control on the server but it does not get updated on the client. This being said, you should add the following settings to your RadAjaxManager's markup declaration:


     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
                    <AjaxSettings> 
                        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="RadSlider1" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                    </AjaxSettings> 
                </telerik:RadAjaxManager> 

    In case my assumption is not correct I suggest to examine the attached project, which I prepared for you in order to demonstrate the desired functionality.

    If you continue experiencing problems, please, open a new support ticket and send us a sample project with detailed explanation of the reproduction steps. 


    Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. nowickim
    nowickim avatar
    16 posts
    Member since:
    Aug 2007

    Posted 16 Apr 2008 Link to this post

    OK that makes sense.  I didn't realize that you had to put a list of updated controls in the AJAX manager.  I'm kind of new to the AJAX stuff.  I also have a non-Telerik control that gets updated inside of the AJAX call.  I assume I need to add that as well, even though it's not a Telerik component?
  7. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 17 Apr 2008 Link to this post

    Hi nowickim,

    With the RadAjaxManager control you can ajaxify all controls that normally work with postbacks. It is up to you how to ajaxify your controls and you should choose the way which best fits your scenario and requirements. You can find more information about the RadAjaxManager functionality and usage in our online documentation, Controls/RadAjax/RadAjaxManager Control section here.

    I also recommend to examine the other sections of the RadAjax chapter of our documentation in order to gather information about other useful features concerning AJAX usage.

    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. S
    S avatar
    11 posts
    Member since:
    Apr 2008

    Posted 24 Jun 2008 Link to this post

    What about a plain old Microsoft Ajax UpdatePanel?  I'm currently seeing an issue where a slider is getting it's value changed in a partial postback (server side) but that change isn't sticking either.  Is the slider compatible with a microsoft update panel?

    Thanks
  9. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 27 Jun 2008 Link to this post

    Hi S,

    I tested setting the RadSlider's value server-side by using a standard Update Panel and it worked as expected as you can see from the attached project.

    Please, make sure that you have put the RadSlider also in the update panel or ensure that it gets updated when the button is clicked.

    In case this does not help, please open a new support ticket and send me a simple reproduction demo. Once I receive it, I will modify it in order to meet your requirements.

    Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. Patrick
    Patrick avatar
    1 posts
    Member since:
    Jun 2008

    Posted 30 Jun 2008 Link to this post

    Of course you can set the value of the rad slider in server side......all you have to do is just use the following code, where ever you want to set the slider value....


    radslider1.value=<any value you want to set>

    same way if you want to retrieve slider value use the following code:

    dim radValue as integer
    radValue=radSlider1.value




Back to Top
UI for ASP.NET Ajax is Ready for VS 2017