This is a migrated thread and some comments may be shown as answers.

problem in disable()

1 Answer 66 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Luci
Top achievements
Rank 1
Luci asked on 03 Sep 2008, 08:41 AM
I have a problem with disabled radcomboboxes.
First, on client side, you cannot select an item while the combo is disabled.
so you need to enable it, set the value, then disable it.
this should be fine but, after a disable() call, the combobox looses the ability of getting the value. this is because the disable function, which looks like (combo.disable.toString() in debugger) :
somecombo.disable = function() {  
var _a0 = this.get_tableElement();  
if (_a0 != null) {  
_a0.className = "rcbDisabled";  
}  
this.set_enabled(false);  
this.set_value(this.get_text());  
this.get_inputDomElement().disabled = "disabled";  
this.disableEvents();  
var _a1 = this._children.get_count();  
for (var i = 0; i < _a1; i++) {  
this._children.getItem(i).disable();  
}  
}  
 

destroys the value, by setting it's text! on the green line 
this.set_value(this.get_text());
this looks like is not correct.
of course, I can workaround this (by changing this function, or by keeping my id before disable then setting it back) but I think this code should be revised.




1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 05 Sep 2008, 01:36 PM
Hi Luci,

Thank you for bringing this to our attention.

Please find attached our internal build and let us know how this goes.

Your points have been updated for your involvement.

Kind regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Luci
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or