function cellSelected(rowId, colId) {
if (_grid.cells(rowId, colId).getAttribute(“notallowed”) != null) {//cell is not enterable
_gridWDC.selectCell(_previousRow, _previousColumn);//send the focus back to the previous cell
return false;
}
This works but it allows the user to enter the cell first, then quickly jumps back to the previous cell. I tried the onBeforeSelect event, but it only lets me know what the new row is, not the new column. If I knew the exact location of the new cell before entry, I could use that and the UI wouldn’t be jumping around.
Thanks sematik, but I think you misunderstood. I’m not asking to prevent the user from editing a cell, I’m asking to prevent the user from entering the cell.
As I indiciated in my intial post, I tried the onBeforeSelect but it only returns the row and previous row, not the column of the new cell. I need to know this because I will be denying entry based on cell, not on the row. Some cells in a row may be enterable.
Please, open ticket at support.dhtmlx.com so we can provide you a custom version of dhtmlxgrid.js with the additional parameter in onBeforeSelect event (column index).
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan