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

Slider with radnumerictextbox.

4 Answers 55 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Ivy
Top achievements
Rank 1
Ivy asked on 09 Jul 2013, 09:35 AM
Hi all

Is it possible to integrate radslider with radnumerictextbox so that each work in a sync fashion. The value change gets reflected in both controls.

Thanks
Ivy

4 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 09 Jul 2013, 12:30 PM
Hi Ivy,

Your requirement is possible to achieve. Please have a look at the following code I tried which works fine at my end.

ASPX:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" ClientEvents-OnBlur="onblur">
</telerik:RadNumericTextBox>
<telerik:RadSlider ID="RadSlider" runat="server" MinimumValue="0" MaximumValue="100"
    LargeChange="25" SmallChange="25" OnClientValueChanged="OnClientValueChanged">
</telerik:RadSlider>

JavaScript:
<script type="text/javascript">
    function OnClientValueChanged(sender, eventArgs) {
        var radnumerictextBox1 = $find("<%= RadNumericTextBox1.ClientID %>");
        radnumerictextBox1.set_value(sender.get_value());
    }
 
    function onblur(sender, args) {
        var slider = $find("<%= RadSlider.ClientID %>");
        slider.set_value(sender.get_value());
    }
</script>

Thanks,
Shinu.
0
Ivy
Top achievements
Rank 1
answered on 09 Jul 2013, 01:22 PM
Thanks a lot. Perfectly answered.
0
Ivy
Top achievements
Rank 1
answered on 19 Jul 2013, 09:14 AM
Hi shinu. Please help me to set blue color to the range selection.
0
Shinu
Top achievements
Rank 2
answered on 19 Jul 2013, 10:02 AM
Hi Ivy,

Try overriding the default CSS as follows.

CSS:
<style type="text/css">
    .RadSlider_Default .rslHorizontal .rslSelectedregion
    {
        background: none !important;
        background-color: Blue !important;
    }
</style>

Thanks,
Shinu.
Tags
Slider
Asked by
Ivy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ivy
Top achievements
Rank 1
Share this question
or