kendo multiselect不起作用

时间:2014-06-30 22:25:42

标签: kendo-ui multi-select kendo-multiselect

我正在使用 Kendo MultiSelect 作为我的某个字段的 UIHint

      the entity having the UIHint is like this:

 public class Test 
{
[UIHint("_MultiSelectList")]
[DisplayName("Labels")]
public List<Students> Labels { get; set; }
 }

我的_MultiSelectList.cshtml是

var multiSelectList = Html.Kendo().MultiSelect().Name("empty");
@(
multiSelectList = Html.Kendo().MultiSelect()
        .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(""))
        .Placeholder(ViewData.ModelMetadata.GetCustomMetadata().Placeholder)
        .BindTo(new  SelectList((System.Collections.IEnumerable)ViewData[fieldId + "_list"], "Value", "Name"))
            .Filter("contains")
        .HtmlAttributes(new { style = String.Format("width: {0}; ", width) })
    );
}

数据未加载到控件中,并呈现为html

     <div class="k-widget k-multiselect k-header" unselectable="on" style="width: 225px;">

<div class="k-multiselect-wrap k-floatwrap" unselectable="on">
    <ul id="Labels_taglist" class="k-reset" unselectable="on" role="listbox"></ul>
    <input class="k-input k-readonly" style="width: 25px" accesskey="" role="listbox" aria-expanded="false" tabindex="0" aria-owns="Labels_taglist Labels_listbox" aria-disabled="false" aria-readonly="false" aria-busy="false"></input>
    <span class="k-icon k-loading k-loading-hidden"></span>
</div>
<select id="Labels" style="width: 225px; display: none;" name="Labels" multiple="multiple" data-role="multiselect" aria-disabled="false" aria-readonly="false"></select>
<span style="font-family: MS Shell Dlg; font-size: 13.3333px; font-stretc…: absolute; visibility: hidden; top: -3333px; left: -3333px;"></span>

这里缺少什么???

0 个答案:

没有答案