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

set_text() after set_value()

1 Answer 347 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Eugene
Top achievements
Rank 1
Eugene asked on 06 Oct 2008, 08:00 PM
Hello,

I have problem with setting values to combobox on client by javascript.

sender.set_value("Value");  
sender.set_text("Text");  
// sender.get_value() is null here!!!

but 

sender.set_text("Text");  
sender.set_value("Value");  
// sender.get_value() has proper value 

Is it by design?

Thanks,
Eugene

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosi
Telerik team
answered on 07 Oct 2008, 02:38 PM
Hello Eugene,

Yes, this is by design.

Calling set_text will clear the value of RadComboBox. When the Text is set and the MarkFirstMatch property is enabled then the item with this text will be selected and its value will became a value of RadComboBox. If MarkFirstMatch is disabled then the value will be string empty.


Regards,
Rosi
the Telerik team

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