【问题标题】:w2ui - Inline edit grid with list. under grid i need to call onselect for each dropdownw2ui - 带有列表的内联编辑网格。在网格下,我需要为每个下拉菜单调用 onselect
【发布时间】:2015-12-09 09:30:21
【问题描述】:

我正在使用w2ui 网格内联编辑与列表和许多其他东西。

如何监听元素的 onselect 事件?

$('#grid').w2grid({
     name: 'grid',
     columns: [
        {
             field: 'fieldname',caption: 'caption',sortable: true,
             editable: {
                 type: 'list',
                 items: people,
                 showAll: true 
                }           
             }
     ],....    

【问题讨论】:

  • 选择行/列?
  • 在下拉列表中选择项目。
  • 知道了。答案如下。让我知道它是否适合你!

标签: jquery grid dropdown w2ui


【解决方案1】:

尝试如下操作并访问链接以获取详细信息。

w2ui.grid.on('change', function(event) {
    console.log(event);
});

您也可以在创建网格时添加它。

$('#grid').w2grid({
    name    : 'grid',
    // . . . . . . . 
    onChange: function(event) {
        console.log(event);
    }        
});

http://w2ui.com/web/docs/w2grid.onChange

【讨论】:

  • 又添加了一个解决方案!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多