New behavior RacComboBox in Q1 2010

Thread is closed for posting
2 posts, 0 answers
  1. [Nean]
    [Nean] avatar
    42 posts
    Member since:
    Mar 2009

    Posted 20 May 2010 Link to this post

    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 ?

  2. Victor
    Victor avatar
    1358 posts

    Posted 25 May 2010 Link to this post

    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,
    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.
Back to Top