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

Problem with SelectedIndex and SelectionChanged with two combos

3 Answers 90 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Celeste
Top achievements
Rank 1
Celeste asked on 28 May 2009, 05:12 PM
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..

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 29 May 2009, 10:02 AM
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.
0
Celeste
Top achievements
Rank 1
answered on 29 May 2009, 02:15 PM
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...

0
Celeste
Top achievements
Rank 1
answered on 29 May 2009, 02:53 PM
Yes, using the binaries of May, works ok!
It had a fix for this problem with FilteringMode

Tags
ComboBox
Asked by
Celeste
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Celeste
Top achievements
Rank 1
Share this question
or