admin管理员组文章数量:1382502
I have a gridPanel with ColumnModel
. One of this columns is ActionColumn
with buttons. And i want by click a button get a cell value from cell in same row with this button? How to do this?
My ActionColumn
{
xtype: 'actioncolumn',
width: 50,
items: [{
icon : url_servlet+'externals/gxp/src/theme/img/pencil.png',
tooltip: 'Редактировать участок',
handler: function(grid, rowIndex, colIndex) {
alert("DAMACIA!!!!");
}
I have a gridPanel with ColumnModel
. One of this columns is ActionColumn
with buttons. And i want by click a button get a cell value from cell in same row with this button? How to do this?
My ActionColumn
{
xtype: 'actioncolumn',
width: 50,
items: [{
icon : url_servlet+'externals/gxp/src/theme/img/pencil.png',
tooltip: 'Редактировать участок',
handler: function(grid, rowIndex, colIndex) {
alert("DAMACIA!!!!");
}
Share
Improve this question
asked Jul 13, 2012 at 8:45
Kliver MaxKliver Max
5,30924 gold badges101 silver badges157 bronze badges
1
- I'm not sure but i think that this answer will help. Agnese – softwareplay Commented Sep 13, 2013 at 9:47
1 Answer
Reset to default 6You have all you need in handler params
handler: function(grid, rowIndex, colIndex) {
var row = grid.getStore().getAt(rowIndex);
console.log(row);
}
The code above will give you the row, so you just need to select desired cell.
If you enforce selection before clicking actioncolumn you can also use code below. But be aware by default clicking on actioncolumn doesn't fire selection, so while clicking actioncolumn an entirely different row can be selected or even no column can be selected at all.
grid.getSelectionModel().getSelection()
本文标签: javascriptHow to get gridPanel cell value ExtJsStack Overflow
版权声明:本文标题:javascript - How to get gridPanel cell value? ExtJs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744010625a2575495.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论