Jquery EasyUI Editable DataGrid如何绑定combogrid控件
JqueryEasyUIEditableDataGrid如何绑定combogrid控件,代码如下,双击edatagrid控件下拉框没有出现$.extend($.fn.da...
Jquery EasyUI Editable DataGrid如何绑定combogrid控件,代码如下,双击edatagrid控件下拉框没有出现
$.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);
}
}
});
top.$('#detail').edatagrid({
columns: [[
{ title: '类型/项目', field: 'KeyId', width: 310,editor:"{type:'combogrid',options:{mode: 'remote',url: 'sys/ashx/dichandler.ashx?categoryId=8',idField: 'KeyId',textField: 'Title',columns: [[{ field: 'KeyId', title: '编号', width: 50, sortable: true, hidden: true },{ field: 'Title', title: '市县', width: 100, sortable: true }]]}}" },
]]
});
}, 展开
$.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);
}
}
});
top.$('#detail').edatagrid({
columns: [[
{ title: '类型/项目', field: 'KeyId', width: 310,editor:"{type:'combogrid',options:{mode: 'remote',url: 'sys/ashx/dichandler.ashx?categoryId=8',idField: 'KeyId',textField: 'Title',columns: [[{ field: 'KeyId', title: '编号', width: 50, sortable: true, hidden: true },{ field: 'Title', title: '市县', width: 100, sortable: true }]]}}" },
]]
});
}, 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询