找回密码
 立即注册

QQ登录

只需一步,快速开始

wlgm
注册会员   /  发表于:2018-7-20 16:44  /   查看:2684  /  回复:1
本人是在 SpreadJS 单元格中做输入联想 AutocompleteCellType.prototype.activateEditor = function (editorContext, cellStyle, cellRect, context) {
        var $editor = $(editorContext);
//        $editor.attr("gcUIElement", "gcEditingInput");
        $editor.kendoAutoComplete({
            dataSource: this.availableTags
        }).data("kendoAutoComplete");
//        $editor.attr("gcUIElement", "gcEditingInput"); // keep focus when mouse down on dropdown
    };
    AutocompleteCellType.prototype.setEditorValue = function (editorContext,value) {
        console.log(editorContext);
    };
    AutocompleteCellType.prototype.getEditorValue = function (editorContext) {
        console.log(value);
        return $(editorContext).val();
    };
在getEditorValue  方法获取值的时候 $(editorContext).val() 只能获取输入的值 并不能获取选中的值 请问这是怎么一回事 ?

1 个回复

倒序浏览
Clark.Pan讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2018-7-20 18:23:37
沙发
$(editorContext)就是您kendoAutoComplete的对象了,至于为什么不能获取选中的值,那你的问kendo啊,已经不是spreadjs产品的范围了。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部