Closed frendcarlo closed 10 years ago
The onClick event passes args like this:
trigger(self.onClick, {row: cell.row, cell: cell.cell, grid: self}, e);
whereas the onSelectedRowsChanged uses:
trigger(self.onSelectedRowsChanged, {rows: getSelectedRows()}, e);
You can either just use args.rows (which is an array of selected row indexes), or use a direct reference to the page-level SlickGrid object or its datasource.
Thanks for your reply. I ended up by adding extra event after getting data which is not that wise but it works..
I got an undefined values when i get data using args.grid.getData() during the onSelectedRowsChanged event. But when I use the onClick() event, the args.grid.getData() is complete. I use the onSelectedRowsChanged event because users sometimes use a keyboard instead of a mouseclick. Is there another event that I can use to extract the selected data? I use the extracted data when a popup detail view is present. This only happen when the selected row is at the last viewable record, and when pressed down key, the next viewable record is on the top.