GetItemsAndContainers method returns no items in the DropDownOpened event

3 posts, 0 answers
  1. Scott
    Scott avatar
    66 posts
    Member since:
    Nov 2009

    Posted 23 Feb 2012 Link to this post

    This problem occurs with the latest 2012 Q1 release.

    If I use the Silverlight toolkit extension method GetItemsAndContainers (System.Windows.Controls.Toolkit.dll) in the DropDownOpened event, the first time this event fires I get 0 items back from this call. It occurs if you bind an IEnumerable to ItemsSource or even explicitly declare strings inside RadComboBoxItem tags.

    private void RadComboBox_DropDownOpened(object sender, EventArgs e)
        RadComboBox rcb = (RadComboBox) sender;
        IEnumerable<KeyValuePair<object, DependencyObject>> itemsContainers = rcb.GetItemsAndContainers();
        RunOpenCount.Text = itemsContainers.Count().ToString();
    This worked in 2011 Q3 and quite a few prior releases too.

    Here is the solution showing the problem:
  2. Yana
    Yana avatar
    4547 posts

    Posted 28 Feb 2012 Link to this post

    Hi Scott,

    Thank you for reporting this issue.

    I am glad to inform you that it is already fixed in the latest internal build (version 2012.2.227). Please download it and give it a try.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
  4. Scott
    Scott avatar
    66 posts
    Member since:
    Nov 2009

    Posted 02 Mar 2012 Link to this post

    Thanks. When I have a chance I'll try it out.
Back to Top