public JsonResult GetContainers() { List<Container> containers = new List<Container>(); containers.Add(new Container() { ContainerId = 1, ContainerName = "Container1" }); containers.Add(new Container() { ContainerId = 2, ContainerName = "Container2" }); return Json(containers); } @(Html.Kendo().ComboBox() .Name("TestContainerName") .DataTextField("ContainerName") .DataValueField("ContainerId") .Filter(FilterType.Contains) .DataSource(dataSource => { dataSource.Read(read => { read.Action("GetContainers", "Common"); }); }) .SelectedIndex(0) )I am using Kendo Grid and also using its Foreign Key column editing option.
When I build my project on local host, it seems everything is perfect.
However, when I publish it, it does not working as on my local host.
On my local, it is a dropdownlist but when I publish it, it seems like its a numeric textbox.
How can I fix this ?
Hi!
After a while, I was able to have a working EditorTemplate for a List<MyObject> type. I'm calling the Template using UIHint over the collection property n the parent ViewModel. The grid on the EditorTemplate is however complete Widget-based now. It is working with the data array woth matching properties as of the actual ViewModel. How do I map the final rows of a kendo grid to the Model?

This isn't really specific to MobileView but I'm using a MobileView in a partial view that I'm using as a layout template and I want to make the Title dynamic by using ViewBag.Title as the string.
@(Html.Kendo().MobileView() .Title(ViewBag.Title) .Name("two-drawer-home") .Header(obj => Html.Kendo().MobileNavBar().Content(navbar => @<text> @(Html.Kendo().MobileButton().Name("btnLeftDrawer").Align(MobileButtonAlign.Left).Rel(MobileButtonRel.Drawer).Url("#left-drawer").ClickOn("down")) @navbar.ViewTitle("Hello there") @(Html.Kendo().MobileButton().Name("btnRightDrawer").Align(MobileButtonAlign.Right).Rel(MobileButtonRel.Drawer).Url("#right-drawer").ClickOn("down")) </text>) .HtmlAttributes(new { style = "height: 46px;" }) ) .Content(@<text>@RenderBody()</text>))
But this isn't valid. I've also tried @ViewBag.Title and various other incarnations. I'm wondering if this type of thing is possible in the Title of the MVC controls.
//Old recurrence exception:recurrenceException:"20160603T050000Z;20160503T050000Z;" //New recurrence exception:recurrenceException:"20160603T050000Z,20160503T050000Z"I'm using a kendo grid popup editor. I have a custom template (partial view) for edit. I have a drop down and on change event, I'm populating a TextBox. The problem is when I am sending the model to the controller, the TextBox value is null. It's not updating the model with the populated value. Any idea why?
@(Html.Kendo().DropDownListFor(w => w.AddressID)
.DataTextField("Name")
.DataValueField("AddressID")
.DataSource(source =>{ source.Read(read =>{ read.Action("GetAddressType", "DataSource")
.Data("filterAddressTypes");})
.ServerFiltering(true);})
.CascadeFrom("CodeIDAddressType")
.Events(e => e.Change("addressSubType"))
)
@Html.TextBoxFor(model => model.AddressLine1)
On an AJAX done function, I'm populating the value.
$("#AddressLine1").val(response.AddressLine1)
I can see the new value in the text box but when submitted, it sends null to the controller. If I enter the value in the AddressLine1 field instead of populating, it sends the entered value to the controller.

I have a form that is used to search for people's names and display them in an Telerik MVC Grid. Grid uses Ajax binding and paging. I have a problem with paging. My situation is that when a user searches for names and the search returns say 3 pages of results. The user flips a page and performs a search again narrowing it down to say 1 page of the results, the grid refreshes but stays on the flipped page which shows up empty because again there is only 1 page of results. Is there a way to reset the paging after each search? I handle the searching explicitly on client side by calling $("#gridElement").data("kendoGrid").dataSource.read();
Any help is appreciated.
Nik