jquery easyui 数据网格 onchange 如何

问题描述 投票:0回答:1

Jquery easyui 我想在更改组合框 limitid 字段时更改 customer_name,

这是我的数据网格字段

带有组合框的第一个字段:'limitid'

th  data-options="field:'limitid', 
width:250,sortable:'true',
formatter:limitidFormatter,

 editor:{                        
type:'combobox',
 options:{

valueField:'limitid',

textField:'name',

data:limitidlist,

required:true

}

}">Limit ID</th>

第二个字段:客户名称

th   data-options="field:'customer_name',

sortable:'true',

width:250">

Customer Name'/th>'

我想知道如何触发onchange函数并填写客户姓名字段

jquery-easyui
1个回答
0
投票

使用组合框的onselect功能...

试试这个..

editor:{
      type:'combobox',
      options:{
                valueField:'limitid',
                textField:'name',
                data:limitidlist,
                required:true
        },
      onSelect:function(record){
                   console.log(record); //this is called whn user select the combobox
                  //do your stuff here///
            }
   }
© www.soinside.com 2019 - 2024. All rights reserved.