This question is locked. New answers and comments are not allowed.
Hi,
I'm getting:
The model item passed into the dictionary is of type 'Swh.Vwb.ViewModels.Admin.CountryEditViewModel', but this dictionary requires a model item of type 'Swh.Vwb.ViewModels.Admin.CountryDisplayViewModel'.
when adding new rows in my grid. Updating a row works fine!
The model binded to the grid is of type: IList<CountryEditViewModel>.
Why am I getting this error?
Regards,
Mattias
I'm getting:
The model item passed into the dictionary is of type 'Swh.Vwb.ViewModels.Admin.CountryEditViewModel', but this dictionary requires a model item of type 'Swh.Vwb.ViewModels.Admin.CountryDisplayViewModel'.
when adding new rows in my grid. Updating a row works fine!
@model Swh.Vwb.ViewModels.Admin.CountryDisplayViewModel...@{Html.Telerik() .Grid(Model.Countries) .Name("Countries") .DataKeys(dataKeys => dataKeys.Add(x => x.ID)) .EnableCustomBinding(true) .PrefixUrlParameters(false) .ToolBar(commands => commands.Insert()) .DataBinding(dataBinding => { dataBinding.Server() .Select("countries", "store") .Insert("insertcountry", "store") .Update("updatecountry", "store")...public ActionResult InsertCountry(CountryEditViewModel model){...public ActionResult UpdateCountry(CountryEditViewModel model){...The model binded to the grid is of type: IList<CountryEditViewModel>.
Why am I getting this error?
Regards,
Mattias