Changing the value of an item in a richselect.

Hi! I was wondering if it is possible to change the value of an specific item whitin a richselect.

for example, richselect has the values 1,2,3,4 and when an function is called, they change to 11,12,13,14.

Here is the code i produced so far, but i can’t seem to get it to work :frowning:

var ui = dhx.ui({
view:“form”, id:“myform”, width:320, elements:[
{ view:“richselect”, id:“select1”, options:[] }
{view:“button”, type:“round”, click:“setDay();”}

],
$$(“select1”).parse([
{ id:“day1”, value:‘1’, label:“first”},{ id:“day2”,value:‘2’, label:“second”}]);

function setDay(){
$$(‘day1’).setValue(‘11’);
$$('day2).setValue(‘12’);

});

Can anyone tell me what i 'm doing wrong? I cant seem to figure it out… :frowning:

thanks in advance!

You can access list of options as $$(“select1_list”) and use list’s api to manipulate with items

$$("select1_list").clearAll(); $$("select1_list").parse(new_data);

Works great!

thank you Stanislav!