SMART datagrid v.1 > Classes > GridBase
Change Location of cell which has the input focus to the cell specified by parameter index.
If index is Invalid Value, it will change before Normalizing first. If focus parameter is true, when the cell which newly has the focus is not displayed in the grid, it will scroll to display the visible location.
You can check the location of cell which currently has the focus through focusedIndex property.
// Move one row up.
$('#moveUp').click(function () {
var index = grid.focusedIndex();
index.rowIndex--;
grid.setFocusedIndex(index, true);
});
// Move one row down.
$('#moveDown').click(function () {
var index = grid.focusedIndex();
index.rowIndex++;
grid.setFocusedIndex(index, true);
});