3.2.0

setCellEditable and setSelectionMode("single-row")

Hi there,

I am wrong or the grid can not be editable when setSelectionMode("single-row") is activated???

Is this supposed to behave like this???
JeanLuc
January 21,
If the selection is set to row, how do you propose you select a cell to edit? You have to be in cell selection mode in order to edit a cell. What you might think about, is a function to set the row highlight color to be the same as the cell color when you click on a cell. That way you can have cell editing and it would 'look' like the entire row is selected.
Jim Hunter
January 21,
Yeah, that would be nice too!!!
JeanLuc
January 23,
The way I get around this is to setSelectionMode to "single-cell" when the user double clicks on a cell and then set the selection back to "single-row" when the current row is changed.

grid.onCellDoubleClicked = function(event, column, row){ 
      this.setSelectionMode("single-cell"); 
      //this.setCurrentColumn(column); 
   }; 

   // Allows row selection 
   grid.onCurrentRowChanged = function(index){ 
      this.setSelectionMode("multi-row"); 
   };


This works fine in Beta3, but in Beta4 a small change is required to ensusre that the colour of the edited cell takes priority over the colour of the selected row.

.aw-cell-edit {
    color: #000!important;
    background: #fff!important;
}


This isn't perfect, but does work reasonably well.
Helen Williamson
January 26,

This topic is archived.

See also:


Back to support forum