Good morning,
I need to dynamically change which elements in a RadComboBox drop down list are visible.
In the code below, the value selected in the first combo box (sender) is used to constrain the value in the second combo box (rcbAsgn) using some information stored in the tooltip for the item.
I tried the following:
function RCBProjects_OnClientSelectedIndexChanged(sender, eventArgs) {
var selPrjTUID = sender.get_value();
var rcbAsgn = $find("<%= RCBAssigned.ClientID %>");
var itms = rcbAsgn.get_items();
var i; var itm; var ttt;
rcbAsgn.trackChanges();
for (i = 0; i < itms.get_count(); i++) {
itm = itms.getItem(i);
ttt = itm._properties._owner._element.attributes[0].value;
var pos = ttt.lastIndexOf("-");
var tttid = ttt.substr(pos + 2, ttt.length - pos - 1);
if (tttid.valueOf() == selPrjTUID.valueOf()) itm.show();
else itm.hide();
}
rcbAsgn.commitChanges();
}
Everything seems to work fine except that, when complete, the second combo box no longer drops down. It is stuck on whatever value it had with no drop down capability at all - even though I have verified that, for example, two of four items have been shown with the other two hidden.
Any ideas?
Thanks.
Chris