Ok i have ran into a bit of a problem i keep getting the an error any time i select an item from the combo box in silverlight 2.0'
I have not wired up any events to the combo box and am accessing data from a service.
The class being returned from the service contains the value Name of type string that im having be displayed in the box.
Im unsure what i have done wrong in this situation. It is populating the box with the names, but crashed out the minute i click to open the list of the items. Now if i use the mouse wheel to scroll through the items it doesnt crash. Any ideas as to what is wrong would be appreciated.
Thanks
XAML for the control, Control imbeded inside of a stackpanel
Code Behind
Error
{System.ArgumentException: Value does not fall within the expected range.
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
at System.Windows.UIElement.TransformToVisual(UIElement visual)
at Telerik.Windows.Controls.RadComboBox.IsOnCurrentPage(Object item, Rect& itemsHostRect, Rect& listBoxItemRect)
at Telerik.Windows.Controls.RadComboBox.ScrollIntoView(Object item)
at Telerik.Windows.Controls.RadComboBox.NavigateToItem(Object item)
at Telerik.Windows.Controls.RadComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
at Telerik.Windows.Controls.Selector.OnSelectionChanged(Object sender, SelectionChangedEventArgs e)
at Telerik.Windows.Controls.Selector.SelectionChanger`1.InvokeSelectionChangedEvent()
at Telerik.Windows.Controls.Selector.SelectionChanger`1.End()
at Telerik.Windows.Controls.Selector.SelectionChanger`1.SelectJustThisItem(T item)
at Telerik.Windows.Controls.RadComboBox.NotifyComboBoxItemMouseUp(RadComboBoxItem comboBoxItem)
at Telerik.Windows.Controls.RadComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}
I have not wired up any events to the combo box and am accessing data from a service.
The class being returned from the service contains the value Name of type string that im having be displayed in the box.
Im unsure what i have done wrong in this situation. It is populating the box with the names, but crashed out the minute i click to open the list of the items. Now if i use the mouse wheel to scroll through the items it doesnt crash. Any ideas as to what is wrong would be appreciated.
Thanks
XAML for the control, Control imbeded inside of a stackpanel
<telerikInput:RadComboBox x:Name="cbFilterWebSites" ItemsSource="{Binding}" DisplayMemberPath="Name"/> |
Code Behind
void _proxy_GetWebsitesCompleted(object sender, GetWebsitesCompletedEventArgs e) |
{ |
ObservableCollection<Website> result = e.Result; |
//create none value for filter |
cbFilterWebSites.DataContext = result; |
} |
{System.ArgumentException: Value does not fall within the expected range.
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
at System.Windows.UIElement.TransformToVisual(UIElement visual)
at Telerik.Windows.Controls.RadComboBox.IsOnCurrentPage(Object item, Rect& itemsHostRect, Rect& listBoxItemRect)
at Telerik.Windows.Controls.RadComboBox.ScrollIntoView(Object item)
at Telerik.Windows.Controls.RadComboBox.NavigateToItem(Object item)
at Telerik.Windows.Controls.RadComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
at Telerik.Windows.Controls.Selector.OnSelectionChanged(Object sender, SelectionChangedEventArgs e)
at Telerik.Windows.Controls.Selector.SelectionChanger`1.InvokeSelectionChangedEvent()
at Telerik.Windows.Controls.Selector.SelectionChanger`1.End()
at Telerik.Windows.Controls.Selector.SelectionChanger`1.SelectJustThisItem(T item)
at Telerik.Windows.Controls.RadComboBox.NotifyComboBoxItemMouseUp(RadComboBoxItem comboBoxItem)
at Telerik.Windows.Controls.RadComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}