EASYUI设置combobox的默认值

来源:互联网 发布:js json对象 编辑:程序博客网 时间:2024/04/29 08:02
       {field:'pervasive',title:'是否普算',width:90,formatter:hdl.easyUIComm.pervasiveFormatter,
                    editor:{
                        type:'combobox',
                         options:{
                                   required: true,
                                   url:contextPath+"/comm/pervasiveSelector.do?ALL=false",
                                   panelWidth:120,
                                   panelHeight:100,
                                   valueField:'key',textField:'value',
                                   onLoadSuccess: function () { //加载完成后,设置选中第一项
                                         var data = $(this).combobox("getData");
                                         if (data.length > 0) {
                                           $(this).combobox('select', data[0].key);
                                       }
                                   }
                                 }
                              }
                }
0 0
原创粉丝点击