DHTMLXCOmbo - Changing the text of an option

Hi, I’m using the combo widget and want to rename the text of an option. I’ve tried using updateOption() and more directly via altering the option.text after a getOption(). For example:

		var option = combo.getOption(id);
		if (option != null) {
			option.text = newText;
			option.selected = true;
			comboScrapBook.redrawOptions();
		}

But, the text in the list box is not affected. And the UpdateOption() like this:

		combo.updateOption(id, id, newName);

I really cannot tell what the arguments are, even after reading the source and the docs.

Another issue is that after selecting an option, as soon as I start typing the new text in the text field, the item is no longer selected. I’ve worked around that by saving the selected index when it’s select event is fired.

Could you please provide a code sample to update the text for an option?

Hi

  1. updateOption(oldvalue, avalue, atext, acss)
    docs.dhtmlx.com/doku.php?id=dhtm … teoption&s[]=updateOption

  2. it is standart behavior
    What do you expect from?