Skip to content

Instantly share code, notes, and snippets.

@jpoehls
Created May 29, 2012 15:00
Show Gist options
  • Save jpoehls/2828914 to your computer and use it in GitHub Desktop.
Save jpoehls/2828914 to your computer and use it in GitHub Desktop.
Handling a row click in SlickGrid
var grid = new Slick.Grid(...);
grid.onClick.subscribe(function (e, args) {
// args:
// - cell
// - grid
// - row
var dataItem = args.grid.getDataItem(args.row);
if (dataItem) {
//window.location.href = '...';
}
e.stopPropagation();
});
@mleibman
Copy link

grid.onClick.subscribe(function(e, args) {
  var dataItem = args.item;
});

@jpoehls
Copy link
Author

jpoehls commented May 29, 2012

@mleibman - I'm running v2.0 and args doesn't have an item property for me. Just cell, grid, and row. Is this something new?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment