set SelectedItem

4 posts, 0 answers
  1. yelong
    yelong avatar
    28 posts
    Member since:
    Aug 2006

    Posted 22 Jul 2009 Link to this post


    this.cmb.SelectedItem = someObjectInstance; //someObjectInstance is not null

    After running the line above, this.cmb.SelectedItem is still null.

    It worked before. But when I upgraded to SL3 and your release on it, it stopped working.

    And even in VS, if I select a ComboBox control instance in the souce code(i.e. this.cmbLocation), and try to "Find All References", VS crashes. Looks, until now, it happens to RadComboBox only.

    Frustrated... We are using your controls on live app ......

    Hope you can solve the issue in the coming relase soon.

    Thanks,

    Yelong

  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 05 Aug 2009 Link to this post

    Hello yelong,

    With Q2 2009 we fixed a bug that allowed RadComboBox to have SelectedItem = something that is not in its Items collection. The same behavior can be observed with the standard ComboBox. I would recommend checking whether the object you are setting as value of the SelectedItem property is inside the Items collection of the control.

    Regarding the "Find All References" problem - we never experienced such crashes with our demos, sample applications or internal Silverlight projects. Could you please send us a simple project that could be used to reproduce the problem and we will respond with a solution ASAP.

    Greetings,
    Valeri Hristov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. yelong
    yelong avatar
    28 posts
    Member since:
    Aug 2006

    Posted 05 Aug 2009 Link to this post

    Hi Valeri,

    Thank you for your reply.

    "Find All References" problem disappeared already. I didn't change anything. Maybe some system update fixed it.

    For the SelectedItem issue, I'm using an approach from the thread http://www.telerik.com/community/forums/silverlight/combobox/treeview-in-a-combobox.aspx

    If it doesn't work now, can you provide another way to get the same function.

    But looks once the RadTreeViewItem is selected, RadComboBox's SelectedItem can be set the value, even it is not in Items. I don't know which exact event causes it work.

    Thanks,

    Yelong
  4. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 06 Aug 2009 Link to this post

    Hi yelong,

    I will create a new, updated blog post demonstrating how to put a treeview in a combobox, right after the service pack release next week. I apologize for the delay, but without the official Silverlight 3 assemblies the sample will be unusable.

    Kind regards,
    Valeri Hristov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top