single click edit

can we enable cell editing on single click for some specific cells in the grid??? Right now i see that we can ebable single click edit on all the cells in the grid using enableEditEvents(click, dblclick, f2Key). But can we have single click edits for some columns in the grid and double click edit for the others???

There is no API method for such functionality , but you use next code

    grid.enableEditEvents(false,true); // edit by dbl-click
    grid.setOnRowSelectHandler(function(id,ind){
       if (some_check(id,ind)   // for some cells
          this.editCell();             // switch to edit state by single click
       return true;
    },true);

Can you please be more clear about some_check(id,ind) ?? Iam not able to get it to work. Say i have a grid with 8 columns and i would like to enable single click edit on columns 1,3,4 and the rest would be double click edits. How can this be done??

Can you please be more clear about some_check(id,ind) ??

It means you can place any check here

>>How can this be done??
    grid.enableEditEvents(false,true); // edit by dbl-click
    grid.setOnRowSelectHandler(function(id,ind){
       if (ind == 0 || ind == 2 || ind == 3)   // for columns 1,3,4
          this.editCell();             // switch to edit state by single click
       return true;
    },true);

I tried the above code and it only works when we select a row by clicking on the column for which we are cheking the index for. So for example if we select a row by selecting a cell of column 0 the edit would happen on that cell in one click but now that the row is selected the single click edit dosent work on rest of the cells (2,3).

Please check attached sample
By default, handler attached by setOnRowSelectHandler fired only once, but if it was init with true as second parameter it will work for any click

   grid.setOnRowSelectHandler(function(id,ind){
       …
    },true);

1207905854.ZIP (1.74 KB)