or
function addContact(e) { debugger; e.preventDefault(); var dataItem = this.dataItem($(e.currentTarget).closest("tr")); // <-- ERROR IS HERE var id = dataItem.Id var url = "@Url.Action("AddContact", "Contacts")"; alert(url); $.ajax({ url: url, type: 'POST', data: { contactID: id }, }); }@(Html.Kendo().Grid(ViewBag.Contacts as List<Contacts>) .Name("Grid") .Columns(columns => { columns.Bound(p => p.FirstName); columns.Bound(p => p.LastName); columns.Bound(p => p.ReleaseDate); columns.Command(command => command.Custom("Add").Click("addContact")).Width(80).HtmlAttributes(new { title = "Add Contact" }); }) .Groupable() .Pageable() .Sortable() .Scrollable(s => s.Height("auto")) .Filterable() .DataSource(dataSource => dataSource .Server() .PageSize(50)))
Hello.
I have some parent container which is bind to ViewModel#1. This container
contains other child container that is bind to ViewModel#2.
I’m not sure yet, but it looks like whole content of child container is bind to ViewModel#1 ONLY.
Is it possible to have such type of binding (having nested views) in Kendo? Would it have some potential issues with binding in that case? (Ambiguous bindings, issues when perform binding, etc.)
If it is not possible, what approach would you recommend?
Thanks ahead,
Andriyan. return new kendo.data.DataSource({ serverFiltering:true, serverPaging:true, serverSorting:true, pageSize:20, transport:{ read:{ url:getContentsListURL() // returns a URL of course! } }, schema:{ data:"items", total:"total_results" } });});