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

RadComboBox adds extra blank item to dropdown

3 Answers 209 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
ChrisM
Top achievements
Rank 1
ChrisM asked on 07 Apr 2011, 04:47 PM
Hi, I have a slight problem with RadComboBox. I have 20 objects in a typed List that are bound to a combobox instance. The combobox has a DataTemplate attached to it, which displays two string properties from each object in a stack panel in each dropdown item. Unfortunately, the combobox dropdown contains 21 objects when it's opened: the 20 objects, as expected, but also one more completely blank item at the bottom. It can't be selected, and try as I might, I can't get this to stop appearing when the combobox's ItemTemplate is set to my DataTemplate. Oddly, it doesn't appear when ItemTemplate is not specified.

The nearest thing I could find which seemed related to this problem was this post from the middle of last year, the only difference being that the blank item at the bottom doesn't disappear when the combobox is reopened.

http://www.telerik.com/community/forums/aspnet-ajax/combobox/blank-item-shows-up-on-first-drop-down.aspx

Any help on this issue would be much appreciated.

- Chris M.

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 07 Apr 2011, 04:54 PM
Hi Chris,

Could you send us a simple project so that we could observe and debug the problem. We will do our best to fix it for the upcoming service pack next week.

Best wishes,
Valeri Hristov
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
0
ChrisM
Top achievements
Rank 1
answered on 07 Apr 2011, 05:11 PM
Hi Valeri, thanks for the rapid reply. I will try to put together a small project that demonstrates the issue.

- Chris M.
0
ChrisM
Top achievements
Rank 1
answered on 04 May 2011, 10:19 AM
Hi Valeri, sorry for the delayed reply - I was moved on to a different task for a short time :) I think that this issue was caused by having a fixed-height dropdown and a VirtualizingStackPanel. As I created a custom UserControl instead of using a ComboBox or RadComboBox in the end, I can't be 100% sure, but I think that setting ScrollViewer.CanContentScroll="False" would eliminate this issue. The performance issue associated with that isn't a problem in our case, as we never have too many items in the list (~15-20). I can verify that this worked to get rid of a similar issue that I encountered with a ListBox that I used as part of my custom UserControl.

- Chris M.
Tags
ComboBox
Asked by
ChrisM
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
ChrisM
Top achievements
Rank 1
Share this question
or