Dear all,
I have a problem with a server binding (I also try a ajax() binding without success).
Here is my model:
Thanks for your help
Sylvain
I have a problem with a server binding (I also try a ajax() binding without success).
Here is my model:
I should have miss something, but what ?Here is mycontrollerpublicclassPlaceModel{publicGuid Id {get;set; }publicstringName {get;set; }publicPlaceModel(){}}End finally, my webpage:namespaceNoolibee.Presentation.Web.SandBox.Controllers{publicclassInventoryController : Controller{//// GET: /Inventory/publicActionResult Inventory(){//Get all places in the databaseIInventoryService serviceRepo = ServiceBusinessFactory.Create<IInventoryService>();List<INV_Place> places = serviceRepo.GetAllPlaces();//Convert the places to a placeModel (for testing purpose)List<PlaceModel> placesModel =newList<PlaceModel>();foreach(INV_Place iteminplaces){placesModel.Add(newPlaceModel() { Id = item.Id, Name = item.Name });}//Return the view with the list of placeModel for the comboboxreturnView(placesModel.AsEnumerable<PlaceModel>());}}}So, the value @Model.Count tells me that there's 1 item, but the combobox is empty.@model IEnumerable<Noolibee.Presentation.Web.SandBox.Models.PlaceModel>@{ViewBag.Title ="Inventory";Layout ="~/Views/Shared/_Layout.cshtml";}<h2>Inventory (size = @Model.Count())</h2><div>@(Html.Kendo().ComboBox().Name("placesDropDownList").DataTextField("Name").DataValueField("Id").BindTo(Model).SelectedIndex(0))</div>
Thanks for your help
Sylvain