I have a webpage with a slickgrid which renders an array of objects on a grid. I want to do some dynamic stuff (a master-detail like setup) when the selected row changes. However to be able to do this, I would need the data of the selected row. I know that the grid.getCurrentCellNode()
function will give me the dom element of the current node, but what I am looking for is a javascript object. For instance, if I use an array of objects like the one below
data = [
{id:1, name:'Khaja', dob:'26/07/1985'},
{id:2, name:'Iqbal', dob:'26/07/1935'}
......
...
];
and if my selected row is the row with id equal to 2, I want to be able to retrive the object {id:2, name:'Iqbal', dob:'26/07/1935'}
Is there a way through which I can get this object?