grid.onClick.subscribe(function(e) {
var cell = grid.getCellFromEvent(e),
row = cell.row;
// var item = dataView.rows[row];
});
I used to use dataView.rows to access the item inside a grid, and this seems not working in the latest version any more, how shall we update the code?
grid.onClick.subscribe(function(e, args) {
var item = args.item;
// or dataView.getItem(args.row);
});
This gets me to the object itself:
grid.onClick.subscribe(function(e, args) {
console.log('clicked: ');
console.log(args);
var item = args.grid.getData()[args.row];
console.log(item);
});
This is quite an old thread, still I felt to update it since args no longer has 'item' in it.
Now it is:
grid.onClick.subscribe(function(e, args) {
var cell = args.cell,
row = args.row;
});
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