在网格上显示selectionchange上的不同项目 [英] show different item on selectionchange on a grid

查看:117
本文介绍了在网格上显示selectionchange上的不同项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网格和一个表单,每当我们在网格上选择一行时,我需要在表单上显示不同的项目。

我一直在寻找如何做到这一点,并找到

  Ext.getCmp('myform')。hide()//或.show()

  listeners:{selectionchange:function(){...} 

现在我不知道哪个行被选中,所以我可以指定要显示哪个项目

感谢

解决方案

<

 听众:{
itemclick:function(view,record,item) ,index,e){
var v = record.get('firstName');
....
....
}
}

firstName 将成为您网格中colums的数据索引。
您可以获得像这样的任何字段的值。


i have a grid and a form, i need to show different items on the form each time we select a row on that grid

i ve been looking on how to do this, and found

    Ext.getCmp('myform').hide() // or  .show()

and

    listeners: { selectionchange: function () {...}

now i dont know which row is selected so i can specify which item to show

thanks

解决方案

Try to following code in your grid.

        listeners:{
                itemclick:function(view, record, item, index, e ) {
                var v = record.get('firstName');
                ....
                    ....
                     }
                  }

firstName will be your dataindex of colums in your grid. You can get value of any field like this.

这篇关于在网格上显示selectionchange上的不同项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆