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

How to bind slider to Grid field

0 Answers 25 Views
Slider
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rafael
Top achievements
Rank 1
Rafael asked on 13 Apr 2011, 03:26 PM
I want to use slider as an editor for a grid'd field, but fail to bind field's value to slider's value

Slider code:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<int>" %>
    <%= Html.Telerik().Slider<int>().Name("PerformanceSlider1")
        .Min(0).Max(100)
        .SmallStep(20).LargeStep(20)
        .TickPlacement(SliderTickPlacement.BottomRight)
        .Orientation(SliderOrientation.Vertical)
        .ShowButtons(false)
        .Value((int)(ViewData["Perf"] as mPerformance).mJanuary)
        .HtmlAttributes(new { id = ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty) + "_wrapper" ,Style = "height: 100px" })
    %>

Model code:
 [UIHint("PerformanceSlider1")]
 public int mJanuary { get; set; }

Please advise what am I missing?

Controller method
 ViewData["Perf"] = _manager.Performance.GetPerformanceForUsers()
Tags
Slider
Asked by
Rafael
Top achievements
Rank 1
Share this question
or