kendo Ui实现搜索选中建议 不改变输入框的值
$("#SubjectFilter").kendoAutoComplete({
dataTextField: "patientCardNumber",
template: $("#header-template2").html(),
messages: {
noData: "未找到受试者"
},
filter: "eq",
autoBind: false,
minLength: 3,
select: function (e) {
if (!e.dataItem) {
return
}
kendo.destroy($("#divEmrInputHtml"));
$("#divEmrInputHtml").html('');
$("#emrFooter").hide();
var p = e.dataItem;
//do something
e.preventDefault();
},
dataBound: function (e) {
//只有一个患者开始默认加载
if (this.ul.find('>*').length == 1) {
this.close();
this.trigger('select', { dataItem: this.dataItems()[0] });
return;
}
//多条记录默认选中未结束的
var aa = this.ul.find('>:not(:has(.project-c))');
if (aa.length == 1) {
this.trigger('select', { dataItem: this.dataItem(aa) });
aa.addClass('k-state-focused k-state-selected')
} else if (aa.length > 1) {
abp.notify.warn('该受试者同时参与了多个项目')
}
},
dataSource: {
type: "abpapi",
serverFiltering: true,
transport: {
parameterMap: function (data, type) {
return { query: $("#SubjectFilter").val() };
},
read: {
url: abp.appPath + 'api/services/app/subject/findByQuery',
}
}
}
}).focusin(function () {
$("#SubjectFilter").data('kendoAutoComplete').popup.open()
});
kendo Ui实现搜索选中建议 不改变输入框的值的更多相关文章
- combo扩展:禁止手工改变输入框的值
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- Kendo UI for jQuery使用教程:使用MVVM初始化(二)
[Kendo UI for jQuery最新试用版下载] Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support ...
- Kendo UI for jQuery使用教程:使用MVVM初始化(一)
[Kendo UI for jQuery最新试用版下载] Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support ...
- 关于kendo ui的使用改变颜色方式
1.概述: 在网上kendo ui教程中示例在演示的时候引用的css样式为kendo.common.min.css与kendo.default.min.css这两个外部样式,大家有没有发现,这两个样式 ...
- JQuery Kendo UI使用技巧总结
Kendo UI开发总结 By Gloomyfish on 2013-04-25 在Grid中支持分页刷新: scrollable: {virtual : true }, 在Gr ...
- jQuery Mobile 和 Kendo UI 的比较(转)
jQuery Mobile 和 Kendo UI 的比较 转自 https://www.oschina.net/translate/jquery-mobile-versus-kendo-ui?cmp ...
- Kendo UI for jQuery使用教程:支持Web浏览器
[Kendo UI for jQuery最新试用版下载] Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support ...
- Kendo UI Grid 使用总结
Kendo UI Grid控件的功能强大,这里将常用的一些功能总结一下. Kendo UI Grid 固定列 在使用Gird控件显示数据时,如果数据列过多,会出现横向滚动条,很多情况下,我们希望某些列 ...
- Kendo UI Grid 批量编辑使用总结
项目中使用Kendo UI Grid控件实现批量编辑,现在将用到的功能总结一下. 批量编辑基本设置 Kendo Grid的设置方法如下: $("#grid").kendoGrid( ...
随机推荐
- Mybatis运用到的3种设计模式
Mybatis运用到的3种设计模式 1.构造者模式2.工厂模式3.代理模式1.构造者模式 使用SqlSessionFactoryBuilder,根据核心配置文件,构造一个SqlSessionFacto ...
- beautifulsoup4 用法一二
声明一个beautifulsoup4对象 bs = ( url,//路由 html_parser,//解析html代码 encoding//编码)//另一种请求解析方法 import requests ...
- printf计算参数是从右到左压栈的(a++和++a的压栈的区别)
一.问题 c++代码: #include <iostream> #include <stdio.h> using namespace std; int main(){ ; co ...
- Qt 5 常用类及基本函数
//主要使用类#include <Qstring> #include <QMenu> #include <QMenuBar> #include <QToolB ...
- touch:创建文件及修改文件时间戳
touch 命令不光可以用来创建文件(当指定操作文件不存在时,该命令会在当前位置建立一个空文件),此命令更重要的功能是修改文件的时间参数(但当文件存在时,会修改此文件的时间参数). Linux 系统中 ...
- 在vue项目中添加一个html页面,开启本地服务器
在vue项目里新增一个不需要登录的页面,那么我只能新增一个html页面了,不经过路由,直接在浏览器输入路径打开,那么就需要用到本地服务器, 1.vue里面的html页面最好放过在public文件夹里面 ...
- 理解ext文件系统
理解ext文件系统 @(0001学习博客) 注意:本文参考骏马金龙的博客,详情请移步浏览 一.一些常见的文件系统 Linux的文件系统: ext2(无日志功能), ext3, ext4, xfs, r ...
- python学习之路(7)
调用函数 Python内置了很多有用的函数,我们可以直接调用. 要调用一个函数,需要知道函数的名称和参数,比如求绝对值的函数abs,只有一个参数.可以直接从Python的官方网站查看文档: http: ...
- plt.plot() 无法使用参数ax
问题参考 TypeError: inner() got multiple values for keyword argument 'ax' fig, ax=plt.subplots(2,1) plt. ...
- C1:DOM 元素的尺寸和位置
DOM元素的尺寸和位置 DOM 元素的尺寸 DOM.offsetWidth/offsetHeight: 包括内容区宽/高,padding,border,不包括margin.如果元素的box-sizei ...