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

Setting SelectedIndex = -1 doesn't clear contents

16 Answers 151 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 22 Apr 2009, 09:11 PM
I haven't seen any resolutions to this issue in the forum, however, I'm running into an issue where setting the SelectedIndex of the RadComboBox to -1 doesn't clear the contents. 

After setting it, I checked the value of the Text property and the SelectedItem property in the Immediate window, the text returns "" and the SelectedItem returns null, however when the screen is displayed, the first items in the RadComboBox are displayed.

Should this not clear the values displayed as well?  Am I doing something wrong?

Thanks in advance

Chris

16 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 23 Apr 2009, 07:55 AM
Hi Chris,

We found and fixed this problem earlier this week. A new internal build that contains the fix will be released tomorrow, you will be able to find it at the following page (you need to be logged-in in order to visit it):
http://www.telerik.com/account/downloads/internal-builds.aspx

Best wishes,
Kaloyan
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Chris
Top achievements
Rank 1
answered on 23 Apr 2009, 12:13 PM
Hi Kaloyan,

I'm sorry, I should have been more specific.  I'm having this issue with Silverlight 2.0.

Regards,

Chris
0
Valeri Hristov
Telerik team
answered on 23 Apr 2009, 12:36 PM
Hi Chris,

The fix Kaloyan is talking about is for RadComboBox for Silverlight 2. Currently there are no internal builds for RadControls for Silverlight, hence the message on the "Internal Builds" page.

I apologize for the misunderstanding.

Greetings,
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
Chris
Top achievements
Rank 1
answered on 23 Apr 2009, 12:45 PM
Hi Valeri,

I went to the link and copied the files in the following zip file RadControls_For_Silverlight3_Trial_2009.3.27.zipwhich was at the download link that Kaloyan specified.  After copying them (I was a bit hasty and didn't see the filename) and trying my app, I didn't see any change (ie. it didn't fix the issue) so I went back to the download site and then realized based on the name that this is the Silverlight3 trial code (based on the filename). 

Did I retrieve the wrong file? 

Thanks in advance

Chris
0
Valeri Hristov
Telerik team
answered on 23 Apr 2009, 12:59 PM
Hi Chris,

The "internal build" that will contain the RadComboBox fix will be available tomorrow. Right now there are no builds that resolve the bug you have found. I will post here again when we are ready.

Kind regards,
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
Chris
Top achievements
Rank 1
answered on 27 Apr 2009, 01:34 PM
Hi Valeri,

Is the new build available?

Regards,

Chris
0
Valeri Hristov
Telerik team
answered on 27 Apr 2009, 01:52 PM
Hi Chris,

Yes, you should be able to see it at:
http://www.telerik.com/account/downloads/internal-builds.aspx

If the page still says that there are no builds for Silverlight, you should download (or at least begin to download) any of the trial installations. This is needed because the system automatically detects what are the products you downloaded in the past and provides only the related builds.

Best wishes,
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
Chris
Top achievements
Rank 1
answered on 27 Apr 2009, 02:17 PM
Hi Valeri,

Perhaps I'm doing something wrong, but it doesn't appear to be fixed.  I selected the ZIP file from the location and copied the files into the directory where the binaries were installed (C:\Program Files\Telerik\RadControls for Silverlight Q1 2009\Binaries\Silverlight).  (Visual Studio was closed at the time).

I then re-opened my project.  A value was selected from my dropdown.  When I then pressed the button that clears the fields (and sets the SelectedIndex = -1 for RadComboBoxes), my combo boxes still displayed a value rather than displaying nothing (even though the SelectedItem is null).

Am I doing something wrong?  

Regards,

Chris

0
Valeri Hristov
Telerik team
answered on 27 Apr 2009, 03:43 PM
Hi Chris,

Did you rebuild the project before running? Probably the assemblies were not updated by Visual Studio? You may also try to re-add the references to the Telerik assemblies if the rebuild does not help. The correct assembly version of all Telerik assemblies is:
2009.1.0424.1020

I am attaching a simple application that has two combo boxes, one data-bound and one with static items. It demonstrates the bug we fixed. Please, let me know if your problem is different.

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
Chris
Top achievements
Rank 1
answered on 27 Apr 2009, 05:23 PM
Hi Valeri,

It still happens, but it happens when the following 2 properties are set: 

IsEditable="True" IsReadOnly="True"

Setting SelectedIndex = -1 displays the first item in the dropdown.

Regards,
Chris
0
Accepted
Valeri Hristov
Telerik team
answered on 28 Apr 2009, 02:59 PM
Hello Chris,

Thank you for the clarification. I found and fixed the new problem. Please, find attached the updated binaries and let me know if they don't work for you.

All the best,
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
Chris
Top achievements
Rank 1
answered on 28 Apr 2009, 05:42 PM
Thanks Valeri, that fixed the issue.
0
TonyG
Top achievements
Rank 1
answered on 11 May 2009, 04:01 AM
I was just struggling with this issue in the ASP.NET Ajax library. I put myCombo.ClearSelection() calls all over the place until the thing finally cleared.  :)   Is this a recognized issue in the Ajax library as well as Silverlight?
0
Valeri Hristov
Telerik team
answered on 11 May 2009, 08:19 AM
Hello TonyG,

I suppose that ASP.NET AJAX RadComboBox might contain similar bug. The best way to confirm it is to ask in the ASP.NET AJAX forums, or write a support ticket. Don't forget to attach a simple sample application that demonstrates the problem - this way you will get the fastest and most accurate response.

Regards,
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
Jonathan Miller
Top achievements
Rank 1
answered on 12 May 2009, 09:13 PM
Is this fix included in the internal builds?
0
Valeri Hristov
Telerik team
answered on 13 May 2009, 09:25 AM
Hello Jonathan,

The changes in the attached binaries are included in the latest internal builds.

Regards,
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.
Tags
ComboBox
Asked by
Chris
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Chris
Top achievements
Rank 1
Valeri Hristov
Telerik team
TonyG
Top achievements
Rank 1
Jonathan Miller
Top achievements
Rank 1
Share this question
or