Recently when I was trying to bind data to a Combo box conditionally I got this message saying "Operation not supported on read-only collection". Though I am clearing items in the collection and binding the ItemsSource I got this error. So I have set ItemSource to null before I clear the items. It worked well for me. Here is the sample snippet for doing this.
Happy CodingCarrierAccountDropDownList.ItemsSource = null;CarrierAccountDropDownList.Items.Clear();CarrierAccountDropDownList.ItemsSource = e.Result;
No comments:
Post a Comment