Hey...
I´m developing a CRUD application and I have a cascade ddl working fine in my Create view :
That works great...
But in a Edit view, I have to previous load the car model selected, so I have something like that :
It works great and my inital Edit view is loaded fine...
Now when I change the car, it loads all car model (cascade) but the CarModelSelected keep the inital value, and the CarModel DropDown dont reset to OptionLabel "Select" .
So, If open a View with :Car A Model AB, change car to "Select", and after select Car A again, the model AB will be selected automatically
How can I fix that?
Thanks
I´m developing a CRUD application and I have a cascade ddl working fine in my Create view :
@Html.Kendo().DropDownListFor(model => model.CarSelected).BindTo(Model.Cars)@(Html.Kendo().DropDownListFor(x => x.CarModelSelected).DataTextField("Name").DataValueField("Id") .Enable(false).AutoBind(false).OptionLabel("Select")) .CascadeFrom("CarSelected") .DataSource(source => source.Read(read => read.Action("CarModels", "Car") .Data("filter")).ServerFiltering(true))But in a Edit view, I have to previous load the car model selected, so I have something like that :
public ActionResult Edit(int id){ var car = repository.load(id); CarVm carVm = car.InjectFrom(car); ... carVm.CarModelSelected = car.Model.Id; return View(carVm);}Now when I change the car, it loads all car model (cascade) but the CarModelSelected keep the inital value, and the CarModel DropDown dont reset to OptionLabel "Select" .
So, If open a View with :Car A Model AB, change car to "Select", and after select Car A again, the model AB will be selected automatically
How can I fix that?
Thanks