Skip to main content


sets selection to specified cells

setCell(row?: any, col?: any, ctrlUp?: boolean, shiftUp?: boolean): void;


  • row: object | string | number - an object with a cell to be selected or the id of a row
  • column: object | string - the config of a column or its id
  • ctrlUp: boolean - true - to select the desired rows or cells, otherwise - false (for multiselection mode)
  • shiftUp: boolean - true - to select a range of rows or cells, otherwise - false (for multiselection mode)


var grid = new dhx.Grid("grid_container", {
columns: [// columns config],
multiselection: false,
data: dataset

var row =;
var column = grid.getColumn("yearlyChange");
grid.selection.setCell(row, column);

For details about how to set selection to multiple cells/rows, see Setting selection to cells.

Related sample: Grid. Multiselection