SMART datagrid v.1 > Classes > GridBase
Select the area between index1 and index2 in the form of style.
If do not specify style, it will follow DisplayOptions.selectStyle settings. If focus is true, you can newly set the location of focused cell according to index1 and style settings. If index1 is CellIndex object, it will unconditionally set the focus in that location, and if style is row selection, it will maintain the focused column, and if it is column selection, it will maintain the focused row. In the rest cases like single selection, it will set the focus to the cell which is closest to index1 value.
$('#select').click(funciton () {
var idx1 = grdMain.focusedIndex();
var idx2 = new DataLudi.CellIndex(grdMain.focusedRowIndex() + 10, idx1.column);
grdMain.setSelection(idx1, idx2, DataLudi.SelectionStyle.BLOCK, true);
}
$('#select').click(funciton () {
grdMain.setSelection(3, 11, DataLudi.SelectionStyle.ROWS, true);
}