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

GetItemsAndContainers method returns no items in the DropDownOpened event

2 Answers 59 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 23 Feb 2012, 06:42 AM
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: http://dl.dropbox.com/u/15525269/ComboBoxIssue.zip

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 28 Feb 2012, 12:12 PM
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.

Regards,
Yana
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Scott
Top achievements
Rank 1
answered on 02 Mar 2012, 06:40 PM
Thanks. When I have a chance I'll try it out.
Tags
ComboBox
Asked by
Scott
Top achievements
Rank 1
Answers by
Yana
Telerik team
Scott
Top achievements
Rank 1
Share this question
or