RadComboBox adds extra blank item to dropdown

4 posts, 0 answers
  1. ChrisM
    ChrisM avatar
    12 posts
    Member since:
    Apr 2011

    Posted 07 Apr 2011 Link to this post

    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.
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 07 Apr 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. ChrisM
    ChrisM avatar
    12 posts
    Member since:
    Apr 2011

    Posted 07 Apr 2011 Link to this post

    Hi Valeri, thanks for the rapid reply. I will try to put together a small project that demonstrates the issue.

    - Chris M.
  5. ChrisM
    ChrisM avatar
    12 posts
    Member since:
    Apr 2011

    Posted 04 May 2011 Link to this post

    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.
Back to Top