Hi,
I have a grid with several columns - one of them is a checkbox column and I want to pre-select specific cells(checkbox cells) at grid render.
I tried it with the ISelectedCell[] inside this.gridInstance.selectCells() in rowDataBound by different ways, but it does not work.
Can you give me please an working solution example of this issue.
Kind Regards
|
// Grid’s databound event handler
onDataBound() {
// This event will be triggered each time the grid data is modified, so flag variable is used so that this case is executed only on Grid initial render
if (this.initialRender) {
this.initialRender = false;
// The required cell indexes to be selected are passed to the selectCells method
this.gridInstance.selectCells([{rowIndex: 0, cellIndexes: [0]}, {rowIndex: 2, cellIndexes: [0, 2]}])
}
} |
Thank you for the fast reply.
Now I have another issue. I want to use batchEdit including dropdownedit in the same grid, based on cellSelection. I am assuming that a double click to open the dropdown in batchedit has no effect on other cells, especially on the checkbox cells, but it has. I'm using exclusively cellSelection in this Grid.
A maybe similar effect can be seen in the example you sent. If I hold the mouse button down on one cell and switch in one direction, it also effects the checkbox cells.
Is there a possibility in batchEdit settings to handle that it has no effect on other cells?