onRowSelect doesn't fire twice when i select same row

Hello,
I’m using a grid and the event “onRowSelect” doesn’t fire twice when the same row is selected.
The problem appears when the form is bound to the grid and when a form’s item is modified.
If i select the same row in the grid the event “onRowSelect” doesn’t fire and the item value is not modified.
Is there a method, tips, tricks, to trigger twice onRowSelect event ?
Thanks.

We actually encountered this same problem when working with the grid. Here’s how we modified the code to make this work as expected.

In dhtmlxgrid.js, find the following function declaration:

this.doClick=function(el, fl, selMethod, show){

Look for this block of code, about halfway down in the function:

} else if (selMethod == 2){ if (el.parentNode.className.indexOf("rowselected") != -1){ el.parentNode.className=el.parentNode.className.replace(/rowselected/g, ""); this.selectedRows._dhx_removeAt(this.selectedRows._dhx_find(el.parentNode)) var skipRowSelection = true; } } this.editStop();
We need to handle the case where the row has already been selected. Change this block of code to be the following (inserting a new “else if” statement code block):

} else if (selMethod == 2){ if (el.parentNode.className.indexOf("rowselected") != -1){ el.parentNode.className=el.parentNode.className.replace(/rowselected/g, ""); this.selectedRows._dhx_removeAt(this.selectedRows._dhx_find(el.parentNode)) var skipRowSelection = true; } } else if(el.parentNode.className.indexOf("rowselected") !== -1) { this.clearSelection(); return this.doClick(el, fl, 0, show); } this.editStop();

This will make selections work as expected on rows that have already been selected.

Hi,
Thank you for your response and for the sample code.
The idea is very interresting purpose I tested the modification without success. I use a grid may be that this only concerns treegrid ?
Thx