Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Franco Merola on Dec 19, 2008 10:11
open dhtmlx forum
Autocomplete

Hi,
i've one problem with autocomplete of the combo in grid: i'm using ver. 1.4 and when i writing for autocomplete, the first time all ok, but if i wrote the same letter in the cell another time, the result value of autocomplete is presented in the cell and the cursor is positioning at the end of value.
In the version which is online, the value is selected and i can modify this value, in my ver. the value is modify but is not selected and the cursor is positioning at the end.So when i wrote, the text is added to the value of autocomplete and not changed the value.
Example
if the value of automplete is
CARLO
CARMEN
when i wrote C, the first i saw:
in the cell C
CARLO
CARMEN
the second time if i wrote C
in the cell CARLO
CARLO
CARMEN
The cursor, in the cell, at the second time is positioning at the end of CARLO, so if i wrote anothe letter (A), the result in the cell is
CARLOA and nothing in the list.
But in the online version, when i wrote C, in the cell compare CARLO, but, ARLO is selected, so when i writing another letter, this override ARLO.
What can i do for selectionig a value of autocomplete?
TX
Answer posted by Support on Dec 20, 2008 01:38
Is incorrect behavior occurs only in IE or in both IE and FF?
Unfortunately the issue can't be reconstructed locally - the code of autocomplete works exactly the same for both first and second data entering, but there is a known situation in case of IE - similar efect can be achieved by using combo inside container with disabled selection ability. ( onselectionstart method used )
For example such situation can occur if you are using combo inside the dhtmlxgrid ( where native selection disabled ) 
Answer posted by francomerola@libero.it on Jan 12, 2009 02:17

Hy,

the problem was due to onselectstart IE.
Now, i've another problem: to open the combo click 3 times.
How can I open the combo with only 2 click as in the online version?
Answer posted by Support on Jan 12, 2009 03:05
The combo as separate entity can be opened by single click , in case of combo in grid it requires action to switch cell to combo and click to open the combo. 
You can control single or double click required to activate cell by enableEditEvents
      grid.enableEditEvents(true,false,false);