找回密码
 立即注册

QQ登录

只需一步,快速开始

eeg1412

注册会员

12

主题

20

帖子

82

积分

注册会员

积分
82
eeg1412
注册会员   /  发表于:2020-4-20 16:55  /   查看:3032  /  回复:1
1金币
autoComplete能否只能选择候补项目以内的项目。当编辑框失去焦点时,编辑框中的内容和候补的所有项目不符的话则清空。

这样能实现吗?

最佳答案

查看完整内容

可以在lostfocus事件中,判断内容是否属于绑定的dataSource之一,如果不是,调用text属性设置为空即可: https://demo.grapecity.com.cn/wijmo/api/classes/wijmo_input.autocomplete.html#lostfocus https://demo.grapecity.com.cn/wijmo/api/classes/wijmo_input.autocomplete.html#text

1 个回复

倒序浏览
最佳答案
最佳答案
KevinChen讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2020-4-20 16:55:18
来自 2#
可以在lostfocus事件中,判断内容是否属于绑定的dataSource之一,如果不是,调用text属性设置为空即可:

https://demo.grapecity.com.cn/wi ... lete.html#lostfocus

https://demo.grapecity.com.cn/wi ... ocomplete.html#text
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部