Combo-Cancel change & show whole list after value is present

I want to be able to use the combobox like an autocomplete from the list provided.

I don’t want the user to be able to have the ability to have any other value other than in the list.
Question #1
Looking through the API I could not see a setting that would do this. Am I correct?

So, is there a way to cancel the change event? So if I detect the change determine the selected value is not in the list, I can revert it back to the previous value it was.

Question #2
Also is there a way, that when you click on a combo that already has a value. The dropdown list that is displayed will show the actual list (whole list) with the current value highlighted?

The behavior of it right now is it shows 1 item is the list, which is the current value and it highlights it. Inorder to see the entire list to make a different seleciton you have to delete the original value then the entire list will appear again.

Thanks,

Angela

If you are not using server-side filtering, you may use the solution provided in the following post for the 1st issue:

viewtopic.php?f=4&t=15549

Also is there a way, that when you click on a combo that already has a value. The dropdown list that is displayed will show the actual list (whole list) with the current value highlighted?

The following can be used to show the whole list when it is open (in case of client-side filtering).

combo.DOMelem.onmouseup = function(){ window.setTimeout(function(){ var text = combo.getComboText(); combo.setComboText(""); combo.filterSelf(); },1); }

Hi, I am wondering if you were able to figure out how to cancel changing the event? Any information you have would be great. I am still trying to figure out what are the best ways to use the API. Thanks!
I want to be able to use the combobox like an autocomplete from the list provided.

I don’t want the user to be able to have the ability to have any other value other than in the list.
Question #1
Looking through the API I could not see a setting that would do this. Am I correct?
[size=1]Lion King Las Vegas[/size]
So, is there a way to cancel the change event? So if I detect the change determine the selected value is not in the list, I can revert it back to the previous value it was.

Question #2
Also is there a way, that when you click on a combo that already has a value. The dropdown list that is displayed will show the actual list (whole list) with the current value highlighted?

The behavior of it right now is it shows 1 item is the list, which is the current value and it highlights it. Inorder to see the entire list to make a different seleciton you have to delete the original value then the entire list will appear again.

Thanks,

Angela

Hi,

I don’t want the user to be able to have the ability to have any other value other than in the
list.

if you do not use server-side filtering, you may use the following approach:

combo.enableFilteringMode(1); var foundMask = ""; combo.attachEvent("onKeyPressed",function(){ var found,i,mask,option; mask = this.getComboText(); i = 0; while(option = this.getOptionByIndex(i)){ if(option.data()[1].indexOf(mask)==0){ found = true; foundMask = mask; break; } i++; } if(!found) this.setComboText(foundMask); });

Also is there a way, that when you click on a combo that already has a value. The dropdown list that is displayed will show the actual list (whole list) with the current value highlighted?

dhxCombo.attachEvent("onOpen",function(){ var text = this.getComboText(); var combo = this; window.setTimeout(function(){ combo.setComboText(""); combo.filterSelf(); combo.setComboText(text); },1); });