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

set SelectedItem

3 Answers 131 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
yelong
Top achievements
Rank 1
yelong asked on 22 Jul 2009, 07:41 PM

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

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 05 Aug 2009, 01:10 PM
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.
0
yelong
Top achievements
Rank 1
answered on 05 Aug 2009, 03:48 PM
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
0
Valeri Hristov
Telerik team
answered on 06 Aug 2009, 01:03 PM
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.
Tags
ComboBox
Asked by
yelong
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
yelong
Top achievements
Rank 1
Share this question
or