easyui combogrid的问题

西坝阿超 2013-10-21 11:02:44
大家好,我是easyui 菜鸟
我想请问下easyui combogrid如何设置选中的值啊
主要的问题是
TypeError: $(...).combogrid is not a function
这样让只能用css的模式来创建combogrid
但是我要设置它选中的值,用css模式就不行了
$(function () {
$('#sh_tonnage').combogrid('setValue','002');
})
我都是按照官方来的,不知道怎么回事
我用的asp.net +easyui。
我想知道的是有没有办法其他办法设置他css模式下data-options下的json的属性啊
请指教
...全文
247 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
嫣如舜华 2013-11-20
  • 打赏
  • 举报
回复
加个扩展:
$.extend($.fn.datagrid.defaults.editors, {
                combogrid: {
                    init: function (container, options) {
                        var input = $('<input type="text" class="datagrid-editable-input">').appendTo(container);
                        input.combogrid(options);
                        return input;
                    },
                    destroy: function (target) {
                        $(target).combogrid('destroy');
                    },
                    getValue: function (target) {
                        return $(target).combogrid('getValue');
                    },
                    setValue: function (target, value) {
                        $(target).combogrid('setValue', value);
                    },
                    resize: function (target, width) {
                        $(target).combogrid('resize', width);
                    }
                }
            });

1,978

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧