I use a form with several comboboxes. Thoose boxes will be load via dataconnector-net
Depending on user selection some of them needs to be disabeld or enabeld. Here a short part of my code:
function setupInputs(value) {
// value depends on user selection in box cboHA_Type
switch (value) {
case ptype.AtCost:
cboClear(cboHA_RiskType);
cboClear(cboHA_Strategy);
cboClear(cboHA_Method);
cboClear(cboBookingUnitReversal);
cboClear(cboProspectiveTest);
cboClear(cboRetrospectiveTest);
break;
case ptype.CFPayer:
// as soon we use this, its impossible to disable other boxes
cboHA_Strategy.clearAll();
cboHA_Strategy.load(datahandler + 'clsStategy.ashx', function () {
cboHA_Strategy.enable();
cboHA_Strategy.selectOption(cboHA_Strategy.getIndexByValue(selValues.HA_Strategy));
});
cboClear(cboBookingUnitReversal);
break;
}
function cboClear(thecombo)
{
thecombo.clearAll();
thecombo.setComboValue(null);
thecombo.setComboText(null);
thecombo.disable(true);
}
In case of ATCost all boxes will be disabeld. This works fine. In case of CFPayer only one box needs to be cleard and disabeld. Others needs to reloaded. As long i only use cboClear(cboBookingUnitReversal); the cboBookingUnitReversal will be disabeld. As soon to put in the part for cboHA_Strategy which will relaod the cboHA_Strategy combobox the cboBookingUnitReversal will shown enabeld. (even if no data fopr it loaded).
The problem is i can’t hold the cboBookingUnitReversal disabeld. The interstinmg part, when i use addOption([]) insteed of the connector all works fine. As soon i use a database connect to fill the box all othes goes to enabeld.
So what to do to work around?
With best regards,
Uwe Janke