Pradeep

a TeamSite blog…

Clear ComboBox in DCT July 8, 2008

Filed under: TeamSite — Pradeep @ 10:59 pm
Tags:

Since FormAPI doens’t have a method to clear the first NULL value in the dropdown, this workaround should work

var cmb = IWDatacapture.getItem(“/combo”);
var cmb_options = cmb.getOptions();
if (cmb_options != null) {
for (var i = 0; i<cmb_options.length; i++) {
cmb_options[i].selected = false;
}
cmb.setOptions(cmb_options);
}

 

Leave a Reply