Your search did not match any results.



The Slider is a UI component that allows a user to set a numeric value on a continuous range of possible values. Range boundaries of the Slider are specified by the min and max properties. This demo illustrates how to customize the component appearance and how to handle the value change event.

Backend API
<div class="form"> <div class="dx-fieldset"> <div class="dx-field"> <div class="dx-field-label">Default mode</div> <div class="dx-field-value"> @(Html.DevExtreme().Slider() .Min(0) .Max(100) .Value(90) ) </div> </div> <div class="dx-field custom-height-slider"> <div class="dx-field-label">With labels</div> <div class="dx-field-value"> @(Html.DevExtreme().Slider() .Min(0) .Max(100) .Value(50) .Label(l => l .Visible(true) .Format(new JS("formatLabel")) .Position(VerticalEdge.Top) ) ) </div> </div> <div class="dx-field custom-height-slider"> <div class="dx-field-label">With tooltip</div> <div class="dx-field-value"> @(Html.DevExtreme().Slider() .Min(0) .Max(100) .Value(35) .Tooltip(t => t .Enabled(true) .Format(new JS("formatLabel")) .Position(VerticalEdge.Bottom) .ShowMode(SliderTooltipShowMode.Always) ) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Without range highlighting</div> <div class="dx-field-value"> @(Html.DevExtreme().Slider() .Min(0) .Max(100) .Value(20) .ShowRange(false) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">With discrete step</div> <div class="dx-field-value"> @(Html.DevExtreme().Slider() .Min(0) .Max(100) .Value(10) .Step(10) .Tooltip(t => t.Enabled(true)) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Disabled</div> <div class="dx-field-value"> @(Html.DevExtreme().Slider() .Min(0) .Max(100) .Value(50) .Disabled(true) ) </div> </div> </div> <div class="dx-fieldset"> <div class="dx-fieldset-header">Event Handling and API</div> <div class="dx-field"> @(Html.DevExtreme().Slider() .ID("handler-slider") .Min(0) .Max(100) .Value(10) .OnValueChanged("slider_valueChanged") ) </div> <div class="dx-field"> <div class="dx-field-label">Slider value</div> <div class="dx-field-value"> @(Html.DevExtreme().NumberBox() .ID("slider-value") .Value(10) .Min(0) .Max(100) .ShowSpinButtons(true) .OnValueChanged("numberBox_valueChanged") ) </div> </div> </div> </div> <script> function formatLabel(value) { return value + "%"; } function slider_valueChanged(data) { $("#slider-value").dxNumberBox("instance").option("value", data.value); } function numberBox_valueChanged(data) { $("#handler-slider").dxSlider("instance").option("value", data.value); } </script>
using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class SliderController : Controller { public ActionResult Overview() { return View(); } } }
.custom-height-slider { height: 75px; } .dx-field .dx-slider { flex: 1; }