在gridpanel中,怎么在已知行、列的情况下取得该单元格的信息,求大神指教
解决方案 »
- 新手请教程序的问题
- JSP如何获取JavaScript的变量值
- js正则表达式中的g到底是什么意思
- 急急急,请指教javascript节点大问题?
- 再麻烦各位大哥看看这个问题?
- 发布:带滚动条可调整列宽的数据表格
- 有关windowsxp下运行javascript不起作用的问题!!!请各位大侠帮忙!小女子先谢过了!!!!
- 繁琐刷新问题,不胜感激!感谢!
- 请问各位大侠:如何用javascript 读取 Temporary Internet Files 目录下的文件
- 想用FLASH做一个菜单,但点击此菜单时要在一个IFRAME里显示链接页,请问FLASH有没有这种功能?该怎么做?谢谢!
- 为什么谷歌浏览器的appname显示netscape
- 发现网站有恶意的注册,可以基本肯定不是人手动恶意注册。
A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once.DOM events from Ext JS ComponentsWhile some Ext JS Component classes export selected DOM events (e.g. "click", "mouseover" etc), this is usually only done when extra value can be added. For example the DataView's itemclick event passing the node clicked on. To access DOM events directly from a child element of a Component, we need to specify the element option to identify the Component property to add a DOM listener to:
new Ext.panel.Panel({
width: 400,
height: 200,
dockedItems: [{
xtype: 'toolbar'
}],
listeners: {
click: {
element: 'el', //bind to the underlying el property on the panel
fn: function(){ console.log('click el'); }
},
dblclick: {
element: 'body', //bind to the underlying body property on the panel
fn: function(){ console.log('dblclick body'); }
}
}
});
listeners:{
cellclick: function(table, td, cellIndex, model, tr, rowIndex, e, eOpts){
//单击单元格事件
}
}
添加单击监听可以得到,但如果直接取就不知道怎么取了,extjs怎么封装之后连table基本的功能都实现不了。
grid.getSelectionModel().getSelection()[0].get('fieldname');
//把grid和'fieldname'换成你的自己定义的名称