This question is locked. New answers and comments are not allowed.
Hello,
I just discovered the fine TabStrip :-)
I use it to seperate some viewmodel items over different tabs. One of them is a slider.
But the slider behaves strange:
- When a slider is put on the first (directly visible) tab, the viewmodel value is shown correctly
- When a slider is put on the second (not directly visible) tab, the viewmodel value is shown incorrectly when i click the tab
- When a slider is put outside the tabstrip, the viewmodel value is shown correctly
- When a slider is put on the first (not directly visible; no selectedindex set to 0) tab, the viewmodel value is shown incorrectly when i click the tab
Incorrect behaviour is shown in the image provided. The slider is set to a value (somthing like 0.5) not equel to the value in the viewmodel (4).
Is this a known issue?
Regards,
Sander
-----
used code:
in the view:
(notice the SelectedIndex is put to comments)
In the controller:
I just discovered the fine TabStrip :-)
I use it to seperate some viewmodel items over different tabs. One of them is a slider.
But the slider behaves strange:
- When a slider is put on the first (directly visible) tab, the viewmodel value is shown correctly
- When a slider is put on the second (not directly visible) tab, the viewmodel value is shown incorrectly when i click the tab
- When a slider is put outside the tabstrip, the viewmodel value is shown correctly
- When a slider is put on the first (not directly visible; no selectedindex set to 0) tab, the viewmodel value is shown incorrectly when i click the tab
Incorrect behaviour is shown in the image provided. The slider is set to a value (somthing like 0.5) not equel to the value in the viewmodel (4).
Is this a known issue?
Regards,
Sander
-----
used code:
in the view:
<% Html.Telerik().TabStrip() .Name("TabStrip1") .Items(tabstrip => { tabstrip.Add() .Text("TabA") .ImageUrl("~/Content/Common/Icons/Suites/mvc.png") .Content(() => {%> <br/> <br/> <div class="editor-field"> <%: Html.EditorFor(model => model.MySlider)%> <%: Html.ValidationMessageFor(model => model.MySlider)%> </div> <br/> <br/> <%}); tabstrip.Add() .Text("TabB") .ImageUrl("~/Content/Common/Icons/Suites/sl.png") .Content(() => {%> <br/> <br/> <%}); }) //.SelectedIndex(0) .Render(); %>(notice the SelectedIndex is put to comments)
The slider editor:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<int?>" %> <%= Html.Telerik().Slider<int>() .Name("MySlider") .HtmlAttributes(new { style = "width:100" }) .Min(0) .Max(10) .ShowButtons(true) .Value(Model) %>
In the controller:
return View(new AboutModel { MySlider = 4, });
The viewmodel:
public class AboutModel { [DataType("Slider")] public int? MySlider { get; set; } }