sets selection to the specified row-cell
row | number|HTMLElement | row index or row object |
cInd | number | cell index |
preserve | boolean | preserve previously selected rows, true/false (optional, false by default). Multiselect mode should be enabled |
edit | boolean | switch selected cell to the edit mode (optional, false by default) |
show | boolean | true|false - scroll row to view (optional, true by default) |
//select the second cell of the first row
myTreeGrid.selectCell(0,1);
//select the second cell of the first row, call "onRowSelect" event,
//preserve previously selected rows
myTreeGrid.selectCell(0,1,true,true);
//select the second cell of the 11th row, switch cell to the edit mode
<button onclick="myfunc()">select cell</button>
<script>
function myfunc(){
(arguments[0]||window.event).cancelBubble=true;
myTreeGrid.selectCell(10,1,false,false,true);
}
</script>
Back to top