zoukankan      html  css  js  c++  java
  • easyui datagrid中关联combox

    datagrid中列上关联combobox
    { field: 'SysCode', title: '系统代码', 150, align: 'left', editor: {
    type: 'combobox',
    options:
    {
    valueField: 'id',
    textField: '要显示的字段名',
    url: '/Sys/SearchCodeInFunctionModel',
    }
    }


    <th data-options="field:'fShipCom',100,align:'center',
                                        formatter:function(value,row){
                                            return row.fShipCom;
                                        },
                                        editor:{
                                            type:'combobox',
                                            options:{
                                                valueField:'fShipCom',
                                                textField:'fShipCom',
                                                url:'ShipPlan.ashx?act=getShipCom',
                                                 onChange :function(value){
                                                  
                                                    var tr = $(this).closest('tr.datagrid-row');
                                                     var idx = parseInt(tr.attr('datagrid-row-index'));
                                                     var ed = $('#dg').datagrid('getEditor',{index:0, field:'fShipName'});
                                                    alert(idx);
                                                    alert(value);
     
                                                    $(ed.target).combobox('reload','ShipPlan.ashx?act=getShipName&fshipCom='+escape(value));
                                                   
                                                     
                                                    },
                                                required:true
                                            }
                                        }">船公司</th>
  • 相关阅读:
    让开发效率“飞起”的VS Code 插件
    转-webpack学习笔记--整体配置结构
    十二、vue中watch原理
    十一、vue生命周期诠释--带图
    十、vue mixins 的用法
    八、Web移动端Fixed布局的解决方案
    七、vue中v-for有时候对页面不会重新渲染,数组变化后如何到渲染页面
    六、vue如何缓存页面
    五、vue常用UI组件
    vue组件递归
  • 原文地址:https://www.cnblogs.com/lijinchang/p/4280912.html
Copyright © 2011-2022 走看看