Potential Issue with grid, 'CellClick' event and edit mode

Hi,
I’m currently testing dhtmlx for one of our in-house development.

I made some tests using version 6.0 of grid.

I hit a strange behavior and just wanted to report it, in case it is a bug.
What I tried to achieve is to:

  • Put a cell in edit mode only by clicking the cell (simple click, not doubleclick default behavior)
  • Keep track of the last selected cell
  • Highlight the selected cell

The JS added looks like:

.myCustomClass{ background:greenyellow; }

For my testing, it works as expected, unless when I click on a cell with a “date” format and then click on another cell after.

What happens is:

  • click on a cell with a “date” format
  • the cell gets the blue frame (default behavior)
  • the cell gets my custom style (green background)
  • date time picker opens
  • while the date time picker is opened, I click in another cell
  • the cell with the “date” format loose the edit mode (blue frame disappear, custom style removed)
  • the cell which gets focus enter edit mode
  • It gets the blue frame (default behavior)
  • It gets my custom style (green background)
    BUT
  • the date from the previously selected “date” cell is copied in the newly selected cell.

All is fine for me except the last point above. The existing data in the cell is lost.

My point is not to discuss if what I tried to do is clever or not or can be achieved another way. It is just for testing. It is only to report a potential underlying bug.

Please, try to call the edit method with a timeout:

grid.events.on("CellClick", function(row,column,e){
     	setTimeout(function(){grid.edit(row.id,column.id)})
});

This works great with a delayed execution, but, as said, my goal was mostly to report the behavior, in case of an underlying bug.

Anyway, thx for the tip.

grid.events.on(“CellClick”, function(row,column,e){
setTimeout(function(){grid.edit(row.id,column.id)})
});

it’s not working to editorType: “select”,

The select editor does not work properly, the dropdown button disappears

https://docs.dhtmlx.com/suite/samples/grid/02_configuration/16_editing.html

UP +1
The same problem

I apologize for the delay.
The problem with the select editing is confirmed.
We’ll try to fix it in the future updates.

Has this issue been fixed in latest version ?

Unfortunaetly this issue is not fixed in the latest version of the dhtmlxGrid.

The original issue was fixed in the dhtmlxGrid 6.5.2