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( ...
随机推荐
- 利用SAX解析读取XML文件
xml 这是我的第一个BLOG,今天在看<J2EE应用开发详解>一书,书中讲到XML编程,于是就按照书中的步骤自己测试了起来,可是怎么测试都不成功,后来自己查看了一遍源码,发现在读 ...
- vue iOS上传图片file 出错
前言 用vue 移动端上传图片在低版本的 ios 手机上 图片转换base64 在转换file 文件类型 会报错 并且报错 “Script Error ” 查阅了github 和一些文档发现 可以吧 ...
- 写在centos7 最小化安装之后
1.最小化安装之后首先解决联网问题(https://lintut.com/how-to-setup-network-after-rhelcentos-7-minimal-installation/) ...
- docker运用
由于目前工作中不使用docker 时间长了,下一个项目中要使用docker ,记录一下docker的运用 1:docker的部署 yum install -y yum-utils device-map ...
- StreamWriter、StreamReader
IO流操作文件内容,using System.IO;//引入命名空间 private void button1_Click(object sender, EventArgs e) { if (text ...
- (转)HTTP请求报文和HTTP响应报文
原地址:http://www.cnblogs.com/biyeymyhjob/archive/2012/07/28/2612910.html HTTP报文是面向文本的,报文中的每一个字段都是一些ASC ...
- react 的className动态修改
https://blog.csdn.net/suwyer/article/details/81481507(copy) <div style={{display: (index===this.s ...
- Spring Boot教程(二十六)使用Spring Security安全控制
准备工作 首先,构建一个简单的Web工程,以用于后续添加安全控制,也可以用之前Chapter3-1-2做为基础工程.若对如何使用Spring Boot构建Web应用,可以先阅读<Spring B ...
- JavaWeb_Servlet生命周期
菜鸟教程 传送门 Servlet生命周期 package com.Gary.servlet; import java.io.IOException; import javax.servlet.Serv ...
- Spring boot之JPA
JPA 步骤: (1)在pom.xml添加mysql,spring-data-jpa依赖 (2)在application.properties文件中配置mysql连接配置文件 (3)在applicat ...