ComboBox set ItemSource and SelectedItem asyncronously

1 posts, 0 answers
  1. Laszlo
    Laszlo avatar
    1 posts
    Member since:
    Oct 2010

    Posted 24 Jun 2011 Link to this post

    Hi,

    I have an issue when using RadCombobox. I use MVVM pattern so I have a viewmodel with an observable collection which is binded to the ItemSource Property to RadCombobox and a SelectedItem property which is binded to the SelectedItem Property to RadComboBox.

    How can I syncronize that the ItemSource will be loaded first and after the RadComboBox sets the SelectedItem?

    When I used the "simple" Combobox I found a solution about this problem:

    http://ppe.code.msdn.microsoft.com/ComboBox-Sample-for-RIA-db6a089f/sourcecode?fileId=19458&pathId=1955785271

    I tried to use this solution for RadComboBox and it is working but when I try to select a new combobox value manualy I get the following exception.

    "throw new Error("Unhandled Error in Silverlight Application Object reference not set to an instance of an object.   Hely: Telerik.Windows.Controls.RadComboBoxItem.BringIntoView()\n   Hely: Telerik.Windows.Controls.RadComboBox.ScrollIntoView(Object item)\n   Hely: Telerik.Windows.Controls.RadComboBox.NavigateToItem(Object item)\n   Hely: Telerik.Windows.Controls.RadComboBox.OnSelectionChanged(SelectionChangedEventArgs e)\n   Hely: Telerik.Windows.Controls.RadComboBox.SelectItemDelayedSelectionChanged(Object item)\n   Hely: Telerik.Windows.Controls.RadComboBox.NotifyComboBoxItemMouseUp(RadComboBoxItem comboBoxItem)\n   Hely: Telerik.Windows.Controls.RadComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)\n   Hely: System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)\n   Hely: MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)");"

    Do telerik have a solution for this syncronizing problems?

    Best Regards Laszlo
Back to Top