Hi All,
I have a Combobox in my Application.The Data is populating into the combo box from database.In the Stored Proc i have given "All" Explicetely.Now i have another combo box in other page in which only data fetching from the database should be populated not "All".So what i did is explecetely removed All by
cmbFeedType.Items.Remove("ALL");
but its throwing an error like "Operation not supported on read-only collection"
can anyone help on this please..
Thanks,
Prasant
Operation not supported on read-only collection in Silverlight
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Priya LingeRank #785 · 2.9K reputationPosted Aug 17, 2011, 5:25 AM EDT
Please try this,
first make the itemsource collection of combobox null;
combobox1.ItemSource=null;
Hope this will help you.
Thanks.
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Aug 17, 2011, 11:34 PM EDT
As ItemSource is ReadOnlyCollection type, you cant remove an item.
Try removing "All" from the dataset/collection BEFORE binding it to the combobox.