I have designed an ExtJS GridPanel and populated data from a database. My requirement is when clicking on a grid row (like edit button) get an id from the grid and populate a window with specific data (retrive data using id from database). How can i achieve this?
Use this:
grid.on('rowclick', function(grid, rowIndex, columnIndex, e) {
console.log(grid, rowIndex, columnIndex, e);
}, this);
Edit: Refer ExtJS Grid FAQ section for Grid related issues
Add it in grid's Listener:
listeners: {
cellclick: function (grd, rowIndex, colIndex, e) {
var record = grd.getStore().getAt(rowIndex);
var record = grd.getStore().getAt(rowIndex);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With