RadComboBox SelectionChanged Text Property Not Set Properly

2 posts, 0 answers
  1. Richard
    Richard avatar
    35 posts
    Member since:
    Jun 2009

    Posted 20 Apr 2016 Link to this post

    When processing the SelectionChanged event for a RadComboBox, the Text property of the control is not yet set with the new text value. For example, we add a RadComboBox with the SelectionChanged event set to the following OnSelectionChanged.

    private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        RadComboBox cb = sender as RadComboBox;
        Trace.TraceInformation("cb.Text = {0}", cb.Text);

    When we start typing in the Combo Box, the displayed text is always the Text value before the latest character. So,l when we type 1, cb.Text is null, when we type 2, the combo box displays "12", but cb.Text is 1.

    How can we see the current value of the text box when the selection is changed?

  2. Yana
    Yana avatar
    4916 posts

    Posted 25 Apr 2016 Link to this post

    Hi Richard,

    You could try getting the Text using a Dispatcher like this:

    Dispatcher.BeginInvoke(new Action(() =>
        Trace.TraceInformation("cb.Text = {0}", cb.Text);

    Let us know whether this will work for you.

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top