Problem with SelectedIndex and SelectionChanged with two combos

4 posts, 0 answers
  1. Celeste
    Celeste avatar
    34 posts
    Member since:
    May 2009

    Posted 28 May 2009 Link to this post

    Hi
    I have two comboBoxes.
    When one is selected I want to clear the content of the other.
    It happens that sometimes it clears the content of the two combos.
    If I use the Microsoft ComboBox default, it works well.

    I have the next code in the  project:

    private void Combo_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)  
    {  
                  
        RadComboBox item = (RadComboBox)sender;  
     
        if (item.SelectedIndex >= 0)  
        {                      
     
            if (item.Name == "ComboUsuario_CmB")  
            {  
                this.ComboGrupo_CmB.SelectedIndex = -1;  
         
            }  
     
            if (item.Name == "ComboGrupo_CmB")  
            {  
                this.ComboUsuario_CmB.SelectedIndex = -1;  
            }  
        }
    I used binaries of April, but the problem persists..
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 29 May 2009 Link to this post

    Hi Celeste,

    According your sample code I created a simple application (attached) that represents my understanding about your scenario. I used the latest service pack of RadControls for Silverlight that was released a couple of days ago and I was not able to reproduce the behavior you are describing. Please, let me know if I am missing something, or there are additional steps that help reproduce the problem.

    Sincerely yours,
    Valeri Hristov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Celeste
    Celeste avatar
    34 posts
    Member since:
    May 2009

    Posted 29 May 2009 Link to this post

    Hi Valeri

    I run your project and it works fine, but it is almost the same code, so I didn`t understand what I was doing wrong.
    I forgot that I had two properties setted: IsEditable = "True" and FilteringMode = "Contains"

    In another thread it was resolved the problem with SelectedIndex and the property IsEditable = true, because of that I downloaded the binaries of April.

    I tested your project and it works well with the property IsEditable = true , but with FilteringMode="Contains", it doesn´t, and clear the two combos.


    I will test it with the last binaries...

  4. Celeste
    Celeste avatar
    34 posts
    Member since:
    May 2009

    Posted 29 May 2009 Link to this post

    Yes, using the binaries of May, works ok!
    It had a fix for this problem with FilteringMode

Back to Top