在gridpanel中,怎么在已知行、列的情况下取得该单元格的信息,求大神指教
解决方案 »
- 为什么我写在jquery中.ajax的success内的if语句不起作用
- jquery ajax async:true
- 关于ajax的调用如何接收返回字符串
- 动态option怎样selected,谢谢阿!
- 求大神帮忙,急死了。。。就是鼠标按下就开始一个事件,鼠标不按了就停止这个时间,该怎样去实现。。。急。。。
- 我想选中一条记录后显示某一个字段的值的地方自动变成OPTION那样的下拉选择框,并且显示相应的记录,请高手指导!十万火急!
- 如何获取iFrame里面的一个input表单的值??????
- showmodaldialog中页面数据如何更新?
- 送分了,日期格式匹配的正则表达式问题!
- 朋友给小弟指条路吧,详细点好吗?比如举个例之类的
- 为什么谷歌浏览器的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'换成你的自己定义的名称