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

Set slider value server side

8 Answers 169 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 11 Apr 2008, 03:56 PM
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

8 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 15 Apr 2008, 02:40 PM
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
0
Matt
Top achievements
Rank 1
answered on 15 Apr 2008, 03:06 PM
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?
0
Svetlina Anati
Telerik team
answered on 16 Apr 2008, 02:53 PM
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
0
Matt
Top achievements
Rank 1
answered on 16 Apr 2008, 04:03 PM
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?
0
Svetlina Anati
Telerik team
answered on 17 Apr 2008, 09:13 AM
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
0
S
Top achievements
Rank 1
answered on 24 Jun 2008, 10:01 PM
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
0
Svetlina Anati
Telerik team
answered on 27 Jun 2008, 01:38 PM
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
0
Patrick
Top achievements
Rank 1
answered on 30 Jun 2008, 05:32 AM
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




Tags
Slider
Asked by
Matt
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Matt
Top achievements
Rank 1
S
Top achievements
Rank 1
Patrick
Top achievements
Rank 1
Share this question
or