In my grid I have set CellClickActionDefault="CellSelect".
This means, for all cells, that a cell will be selected when I click it. Is it possible to have CellClickActionDefault="Edit" for a part of the columns/cells, so some cells will be selected when I click them and some cells will go straight to edit-mode, when I click them?
Thanks! I've added the following javascript-method and it selects the cells that I want to select and go to edit-mode in the cells where I want it:
function BeforeEditMode(gridID, cellID) { cell = igtbl_getCellById(cellID); if (cell.Column.Key == "BlahBlah") { cell.setSelected(true); return true; } else { return false; } }
But my problem is not entirely solved. The reason for wanting to go to select-mode in some cells is, that I want the grid to act like Excel: In Excel, you can click a cell and it will be selected. If you start typing, it will go to edit mode. That is not the case with the solution above. Using this solution, the grid will not go to edit-mode when you start typing.
So, new question: Is it possible to cancel the edit-event when the user clicks the cell/uses the arrows on the keyboard to navigate to the cell, but allow the edit event when the user starts typing something.
Why don't you set the entire grid to select-mode, you ask? Because I use WebCombo in some columns.. If these columns are set to CellClickActionDefault="CellSelect", the user will have to double-click the cell to just see the webcombo, and then click again to epand it. If in edit-mode, the use only have to click once to see it, and once to expand it, like in this example.
The CellClickAction can't be subdivided on a column/cell level through a property. However you try setting the CellClickAction to Edit, and handle te client side BeforeEnterEditMode event. If the cell is one you want to select on rather then edit, you would select the row programmatically and then cancel the enterEditMode (return true).