I am currently unable to set the values of a slider and rangeslider on a page. There are no Javascript errors, it appears the sliders are just not redrawing with the new values. Sliders:
How I am setting the values:
The strange thing is the values appear to be "sticking" for the sliders, as in if you reference
<
div
>
@{
Html.Kendo().RangeSlider<
double
>()
.Name("theRangeSlider")
.Min(0).Max(100)
.SmallStep(1)
.LargeStep(10)
.Values(new double[] { Model.LowLimit, Model.HighLimit })
.Events(e => e.Slide("onRangeSliderChanged"))
.HtmlAttributes(new { style = "width: 425px;" })
.Render();
}
</
div
>
<
div
>
@{
Html.Kendo().Slider<
double
>()
.Name("theSlider")
.Min(0).Max(1)
.SmallStep(.01)
.LargeStep(0.1)
.Tooltip(t => t.Format("{0:P0}"))
.Value(Model.SliderValue)
.ShowButtons(false)
.Events(e => e.Slide("onSliderChanged"))
.HtmlAttributes(new { style = "width: 425px;" })
.Render();
}
</
div
>
How I am setting the values:
$(
"#theSlider"
).data(
"kendoSlider"
).value(sliderValue);
$(
"#theRangeSlider"
).data(
"kendoRangeSlider"
).value([lowerValue, higherValue]);
//Have also tried:
$(
"#theRangeSlider"
).data(
"kendoRangeSlider"
).values([lowerValue, higherValue]);
$(
"#theRangeSlider"
).data(
"kendoRangeSlider"
).value(lowerValue, higherValue);
$(
"#theRangeSlider"
).data(
"kendoRangeSlider"
).values(lowerValue, higherValue);
The strange thing is the values appear to be "sticking" for the sliders, as in if you reference
$(
"#theRangeSlider"
).data(
"kendoRangeSlider"
).values()
the values are exactly as I set them. The slider just does not change.