开发者论坛

 找回密码
 注册 (请使用非IE浏览器)
查看: 3770|回复: 0

求助:我建了一个EditorTemplates,但是默认不选中第二个

[复制链接]

0

精华

84

贡献

130

赞扬

帖子
210
软币
2538
在线时间
438 小时
注册时间
2014-2-15
发表于 2015-6-2 09:08:38 | 显示全部楼层 |阅读模式
本帖最后由 人工智能 于 2015-6-2 09:15 编辑

在非EditorTempaltes可以默认选中。
@{
    Layout = null;
   
}
@model TelerikMvcAppCallCenter.Models.Bulletin
<!DOCTYPE html>
<html>
<head>
    <title>BulletinEditor</title>
    <style>
        .k-edit-buttons {
            width:760px;
            bottom:0px;
        }
        #substance {
            width:760px;
        }
    </style>
</head>
<body>
   <div id="title" style="padding:10px;">
       @Html.Label(Model.Title);
      
        @Html.Label("公告标题:")
        @Html.TextBoxFor(c => c.Title, new {@class="k-textbox" })
        @Html.Label("优先级别:")
        @(Html.Kendo().ComboBox()
          .Name("fabric")
          .Filter("contains")
          .Placeholder("选择优先级...")
          .DataTextField("Text")
          .DataValueField("Value")
          .BindTo(new List<SelectListItem>() {
              new SelectListItem() {
                Text = "低", Value = "0"   
              },
              new SelectListItem() {
                Text = "中", Value = "1"   
              },
              new SelectListItem() {
                Text = "高", Value = "2"   
              }
          })
          .SelectedIndex(2).Value("2")
         
    )
    </div>
   
</body>
</html>


回复

使用道具 举报

Archiver|手机版|小黑屋|开发者网 ( 苏ICP备08004430号-2 )
版权所有:南京韵文教育信息咨询有限公司

GMT+8, 2025-2-23 13:49

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表