KendoUI系列:ComboBox
1、基本使用
1>、创建Input
<input id="color" placeholder="Select Color..." />
<link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2014.1.318/jquery.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/kendo/2014.1.318/kendo.web.min.js")" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#color").kendoComboBox({
dataTextField: "text",
dataValueField: "value",
dataSource: [
{ text: "Black", value: "1" },
{ text: "Orange", value: "2" },
{ text: "White", value: "3" }
],
filter: "contains" // 包括:eq,neq,gt,gte,lt,lte,startswith,endswith,contains,doesnotcontain
//index: 1 // 默认选中项索引,索引从0开始。
});
});
</script>
效果预览:
设置初始化时选中项:
var color = $("#color").data("kendoComboBox");
color.select(1); // 设置初始化时选中项,索引从0开始。
获取当前选中项Value值:
var color = $("#color").data("kendoComboBox");
color.value();
获取当前选中项Text值:
var color = $("#color").data("kendoComboBox");
color.text();
2>、创建select
KendoUI系列:ComboBox的更多相关文章
- KendoUI系列:Window
1.基本使用 <link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css") ...
- KendoUI系列:MultiSelect
1.基本使用 1>.创建Input <link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common. ...
- KendoUI系列:DatePicker
1.基本使用 <link href="@Url.Content("~/C ontent/kendo/2014.1.318/kendo.common.min.css" ...
- KendoUI系列:DropDownList
1.基本使用 1>.创建Input <input id="dropDownList" /> <link href="@Url.Content(&q ...
- [转]KendoUI系列:Grid
本文转自:http://www.cnblogs.com/libingql/p/3774879.html 1.基本使用 <div id="grid"></div&g ...
- C# WinForm开发系列 - ComboBox
5.一个带CheckBox,分组,颜色标记等功能的下拉框 PowerComboBoxCSharp.rar 包含自动完成下拉框,字体下拉框,电脑盘符,多列下拉框,带CheckBox,树型下拉框等.代码 ...
- KendoUI系列:TreeView
1.加载本地数据 <link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css" ...
- KendoUI系列:TabStrip
<link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css")" ...
- KendoUI系列:PanelBar
<link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css")" ...
随机推荐
- IOS的一些小技巧
1.播放短声音 SystemSoundID shake_sound_male_id = ; NSString *thesoundFilePath = [[NSBundle mainBundle] pa ...
- C++回调函数的应用<转自:http://blog.csdn.net/wubin1124/article/details/4386269>
一回调函数 我们经常在C++设计时通过使用回调函数可以使有些应用(如定时器事件回调处理.用回调函数记录某操作进度等)变得非常方便和符合逻辑,那么它的内在机制如何呢,怎么定义呢?它和其它函数(比如钩子函 ...
- 读bootstrap2.3.2有感1
起步: 下载编译好的bootstrap2文件,百度新版jquery.js,并复制html模版(hello world)放置在同一目录,然后看了下官网上的范例网站,心里还是很激动啊~ <!DOCT ...
- ADO.NET Entity Framework
ADO.NET Entity Framework 是微软以 ADO.NET 为基础所发展出来的对象关系对应 (O/R Mapping) 解决方案, 早期被称为 ObjectSpace,现已经包含在 V ...
- 改变html中鼠标形状
要修改的属性是: style=”cursor:default” 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 pointer:是手型. crosshair:是十字 ...
- QQ分组显示列表ExpandableListView组件应用源码
ExpandableListView又称为可扩展的ListView组件,他和ListView组件很相似 不过每行的显示有两个xml文件,一个xml文件用于定义分组列表的显示风格, 还有一个xml文件用 ...
- IOS 通过苹果开放API检测更新
#define APPID @"1067207206" -(void)onCheckVersion { NSDictionary *infoDic = [[NSBundle mai ...
- python中re.findall()找到的结果替换
正则表达式re模块中用findall查找到的是ascii码,所以当比对替换时也需要对应的ascii码才能匹配成功.以下程序是查找文件夹下文件名中含有男.女的文件,并将男替换成1,将女替换成2的程序 # ...
- Android网页中tel,sms,mailTo,Intent,Market协议用法总结
tel:协议---拨打电话 <a href="tel:">调出拨号界面</a> <a href="tel:10086">调 ...
- 【原创】.NET之我见
最近在准备面试,自己也顺带巩固了下基础,加上自己对码农的一些理解都写在这里了,水平不行,欢迎吐槽 //.NET基础 1.Class 和struct 区别 类是一种“引用类型”.创建类的对象时,对象赋值 ...