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

New behavior RacComboBox in Q1 2010

1 Answer 51 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
[Nean]
Top achievements
Rank 1
[Nean] asked on 20 May 2010, 08:29 AM
Hi everyone,

I'm working on a project in WinForms using the Telerik library. We previously used the Q2 2009 version of the library. In our project we use a RadComboBox wich is contains a bunch of default answers.But the combo accept custom text and when the user select a default answer, in the SelectedIndexChanged event we add to the text of the combo the selected awser seperated from the original text (saved in the tag of the combo when the dropdown is opened) by a " - ".

Here is the code :

private void rcbElement_SelectedIndexChanged(object sender, EventArgs e) 
            RadComboBoxEditorElement rcbe = (RadComboBoxEditorElement)sender; 
             
            rcbe.Text = (rcbe.Tag.ToString() == "" ? "" : rcbe.Tag + (rcbe.Text == "" ? "" : " - ")) + rcbe.Text; 
            rcbe.SelectedText = ""
            rcbe.Tag = rcbe.Text; 

But now with the new version (Q1 2010 SP2) this doesn't work anymore. The text of the combo remains the text of the selected item. How can we do that with the new version ?

[Nean]

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 25 May 2010, 05:38 PM
Hi [Nean],

Thank you for the question.

RadComboBox and RadListBox underwent a major refactor of the data binding logic and the events for Q3 2009. We attempted to make the behavior of RadComboBox and RadListBox as close as possible to the standard ComboBox and ListBox controls. You will notice that you can not set the Text of the standard ComboBox control in the SelectedIndexChanged event as well. There is an internal synchronization between the combo box text and its items and it happens after the SelectedIndexChanged event has fired. In RadComboBox a similar thing is happening.

You will have to find a more appropriate moment to update your text. Write again if you have other questions.

Sincerely yours,
Victor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
[Nean]
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or