Avatar

Level 10

Hi Tom,

You can loop though the items testing for one with a specific value, in your case "0", "1", "2" with this code (for ChecboxB)

 

if (CheckboxB.rawValue != 0 ){

    ListBox2.addItem("Desk- $300","1");

}

else {

    for (var i = 0; i < ListBox2.length; i++) {

        if (ListBox2.boundItem(ListBox2.getDisplayItem(i)) == "1") {

     ListBox2.deleteItem(i);

            break;

     }

  }

}

Regards

Bruce