w2grid.prevCell

Returns previous cell or null if it is first cell in the grid.
prevCell(index, colIndex, editable)
index integer, record index
colIndex integer, column index
editable boolean, indicates if to return previous editable cell
Returns { index, colIndex } object or null.

Description

This method returns you previous cell or previous editable cell. It will advance to the previous row if any. If there is no previous cell, it will return null. Will skip hidden columns.
The first argument index is the index in the .records array. The second argument colIndex is the index in the .columns array.
If you have grid defined in the following way: You can do:

User Comments

comments powered by Disqus