// $('#goods-grid').edatagrid({ // url: '/ClientGoods/Goods?client=' + client + '&' + Math.random(), // saveUrl: '/ClientGoods/SaveGoods?Client_ID=' + client + '&' + Math.random(), // updateUrl: '/ClientGoods/SaveGoods?Client_ID=' + client + '&' + Math.random(), // destroyUrl: '/ClientGoods/Remove', // onAdd: function(index, row) { // var product = $('#goods-grid').datagrid('getEditor', { index: index, field: 'Product_Name' }).target; // var name = $('#goods-grid').datagrid('getEditor', { index: index, field: 'Goods_Name' }).target; // product.combobox({ // onSelect: function(value) { //// alert('/GoodsROM/Goods?product=' + value.Identifier + '&' + Math.random()); // var url='/GoodsROM/Goods?product=' + value.Identifier + '&' + Math.random(); // name.combobox({url:'/GoodsROM/Goods?product=' + value.Identifier + '&' + Math.random(),valueField:'Goods_ID',textField:'Goods_Name',required:true,panelHeight:'auto'}); // } // }); // name.combobox({ // onSelect: function(value) { // //alert(value.Goods_Name); // //获取物理属性值 // getGoods(value.Goods_ID, index); // //alert('end'); // } // }); // }, // onEdit: function(index, row) { // var product = $('#goods-grid').datagrid('getEditor', { index: index, field: 'Product_Name' }).target; // var name = $('#goods-grid').datagrid('getEditor', { index: index, field: 'Goods_Name' }).target; // product.combobox({ // onSelect: function(value) { // //alert('/GoodsROM/Goods?product=' + value.Identifier + '&' + Math.random()); // var url='/GoodsROM/Goods?product=' + value.Identifier + '&' + Math.random(); // name.combobox({url:'/GoodsROM/Goods?product=' + value.Identifier + '&' + Math.random(),valueField:'Goods_ID',textField:'Goods_Name',required:true,panelHeight:'auto'}); // } // }); // name.combobox({ // onSelect: function(value) { // //alert(value.Goods_Name); // //获取物理属性值 // getGoods(value.Goods_ID, index); // //alert('end'); // } // }); // }, // onBeforeSave: function(index, row) { // row.Goods_ID = row.Goods_Name; // row.Client_ID = client; // row.Product_ID = row.Product_Name; // } // }); }); function getGoods(id,index) { $.post( '/Goods/getGoods' , { identifier: id }, function (data) { if (data) { var phy = $( '#goods-grid' ).datagrid( 'getEditor' , { index: index, field: 'Physical' }).target; var che = $( '#goods-grid' ).datagrid( 'getEditor' , { index: index, field: 'Chemistry' }).target; $(phy).val(data.Physical); $(che).val(data.Chemistry); } }, 'json' ); // } |
[原创]EasyUI的edatagrid中的行combobox级联实例代码
相关推荐
- EasyUI中那些不容易被发现的坑——EasyUI重复请求2次的问题 - 西安王磊 - 博客园
- easyui datagrid 重复加载解决办法 - zhaobao110的专栏 - CSDN博客
- 关于jquery easyui datagrid执行多次的问题
- 后台管理UI - HackerVirus - 博客园
- 构建ASP.NET MVC5+EF6+EasyUI 1.4.5 +Unity4.x注入的后台管理系统(70)-微信公众平台开发-成为开发者 - ymnets - 博客园
- [转载]使用 JQuery EasyUI - 重庆大漠孤烟 - 博客园
- EasyUI修改DateBox和DateTimeBox的默认日期格式
- [转载]构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(48)-工作流设计-起草新申请 - ymnets - 博客园