There is a ReadOnly List, i want to bind this list to a dropdownlist, and insert a default item like bellow:
GeoList.GetAllGeo((s, o) =>
{
if (o.Error == null)
{
Geos = o.Object;
Geos .Insert(0, new GeoInfo(0, "Please Select One"));
}
});
Goes is a type of GeoList property in my ViewModel, whick as ItemsSource of my Dropdownlist
but a exception been thrown said: Insert is an invalid operation
please help me.
You have to set IsReadOnly to false to do insers. What you really want to do in this case is add this"fake" item on the server in DP_Fetch anyway,
Yes, you are definitely right.
Thanks very much!
Copyright (c) Marimer LLC