码迷,mamicode.com
首页 > 其他好文 > 详细

easyui datagrid 自定义editor

时间:2014-08-27 16:04:57      阅读:369      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   color   io   ar   div   cti   log   

 1   $.extend($.fn.datagrid.defaults.editors, {
 2         mycombogrid: {
 3             init: function (container, options) {
 4                 var input = $(‘<input type="text" class="datagrid-editable-input">‘).appendTo(container);
 5                 input.combogrid(options);
 6                 return input;
 7             },
 8             getValue: function (target) {
 9                 return $(target).combogrid(‘getValue‘);
10             },
11             setValue: function (target, value) {
12                 $(target).combogrid(‘setValue‘, value);
13             },
14             resize: function (target, width) {
15                 $(target).combogrid(‘resize‘, width);
16             }
17         }
18     });
{
                field: ‘sku‘, title: ‘SKU‘, width: 80, editor: {
                    type: ‘mycombogrid‘, options:
                        {
                            required: true, panelWidth: 410,
                            mode: ‘remote‘,
                            valueField: ‘sku‘,
                            idField: ‘sku‘,
                            textField: ‘sku‘,
                            url: ‘/Product/listSearch‘,
                            fit: true,
                            required: true,
                            columns: [[
                                { field: ‘sku‘, title: ‘sku‘, width: 100 },
                                { field: ‘name‘, title: ‘名称‘, width: 200 },
                                { field: ‘description‘, title: ‘描述‘, width: 100 }
                            ]]
                        }
                }
            }

 

easyui datagrid 自定义editor

标签:des   style   blog   color   io   ar   div   cti   log   

原文地址:http://www.cnblogs.com/tgdjw/p/3939388.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!