怎么获取ext里grid中的ComboBox 并动态改变里面的值

 我来答
检永贞4k
2016-09-10 · TA获得超过1784个赞
知道小有建树答主
回答量:508
采纳率:0%
帮助的人:216万
展开全部
Ext4官方的案例第一个,array-grid,里面的actioncolumn xtype: 'actioncolumn', width: 50, items: [{ icon : '../shared/icons/fam/delete.gif', // Use a URL in the icon config tooltip: 'Sell stock', handler: function(grid, rowIndex, colIndex) { var rec = store.getAt(rowIndex); alert("Sell " + rec.get('company')); } }, { getClass: function(v, meta, rec) { // Or return a class from a function if (rec.get('change') < 0) { this.items[1].tooltip = 'Hold stock'; return 'alert-col'; } else { this.items[1].tooltip = 'Buy stock'; return 'buy-col'; } }, handler: function(grid, rowIndex, colIndex) { var rec = store.getAt(rowIndex); alert((rec.get('change') < 0 ? "Hold " : "Buy ") + rec.get('company')); } }]可以那个getClass那里设置,用rec.get('xxx')来获取所在行xxx字段的值,根据不同的值返回css设置的图标。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式