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

How to retrieve RadComboBoxItems when using VirutalizingStackPanel?

1 Answer 61 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 01 Mar 2011, 07:38 PM
Hi,

I'm using WebAii to write automated tests for a Silverlight application.  Recently, some the RadComboBoxes in the app have been changed to use the VirtualizingStackPanel.  The following test code now fails with the following error:  

  • Code Sample - int saveCount = radComboBox.Items.Count;
  • Error Generated - System.TimeoutException:  Wait for condition has timed out.

This will happen on any statement that attempts to reference the Telerik.WebAii.Controls.Xaml.RadComboBox Items property,

How do I get this to work (or what's the work around) when the VirtualizingStackPanel is used with the RadComboBox control?

Thanks.

Joel

1 Answer, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 07 Mar 2011, 02:44 PM
Hello Joel,

There was a missed case in the wrappers for RadComboBox. It was searching for StackPanel but in this case the container is VirtualizingStackpanel. We fixed it and it will not crash in next version of the framework. However if you want to check the count of all items it will not work. WebAii framework depends on the items in the visual tree and it will take into account only the visible items. So if you have 1000 items for example the count will return just 11(the visible ones). This is how virtualization works and if these items are not in the visual tree we can't do nothing about it.

I have updated your Telerik points for your report. Don't hesitate to contact us if you have further questions.

All the best,
Boyan
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
Joel
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or