Find last selected cell from grid by using div

How do I get last selected cell from within a grid if I select multiple cells. I have one attribute which always appends to selected cell’s div. Is there any way to find last selected cell by there div as I have to append another attribute to my div.

if you are using mygrid.getSelectedId(true); it returns an array of selected ids. They are stored in the historical order. So the last one in array is the last one selected.

Thanks…Its working… Is there any way to get the cell information (CSS too) of selected cell.

You can obtain HTML element of any cell by using getItemNode API

var node = dtable.getItemNode({ row: 1, column:"title" });