or
function onClickPostBatch(e) { var dataItem = this.dataItem($(e.target).closest("tr")); //document.body.style.cursor = "wait"; $("html").css("cursor", "wait"); $.post('@Url.Action("PostBatch", "Home")', { batchId: dataItem.BatchID }, function (data) { if (data.error) { alert('' + data.message); } else { alert(data.message); location.reload(); } }); //document.body.style.cursor = "default"; $("html").css("cursor", "default");schema: { type: "xml", data: "/xmlResponse/Contacts/Contact", model: { id: "NameSequence", fields: { name: "Name/text()", phoneNumber: "PhoneNumber/text()", email: "Email/text()", nameSequence: "NameSequence/text()" } } }schema: { model: { id: "ProductID", fields: { ProductID: { editable: false, nullable: true }, ProductName: { validation: { required: true } }, UnitPrice: { type: "number", validation: { required: true, min: 1} }, Discontinued: { type: "boolean" }, UnitsInStock: { type: "number", validation: { min: 0, required: true } } } }$("#AlertListView").kendoListView({ dataSource: { data: [] }, template: "<li>#: message #</li>", displayMessages: function( messages ) { ... }, hideMessages: function( ) { ... }});var customerSearchLayout = new kendo.Layout($('#customer-search-view-template').html()); customerSearchLayout.render($("#searchCust")); var addCustomerView = new kendo.View($('#add-customer-view-template').html()); var customerGridView = new kendo.View($('#customer-grid-view-template').html()); var layout = new kendo.Layout("<div id='content' class='contentDiv'></div>"); layout.render($("#main")); layout.showIn("#content", customerGridView);var customerSearch = kendo.observable({ customerName: "Customer name", searchClicked: function() { this.set("customerName", "Search clicked"); }, newClicked: function(e){ e.preventDefault(); this.trigger("newCustomerClicked"); } }); customerSearch.bind("newCustomerClicked", function(){ layout.render($("#main")); layout.showIn("#content", addCustomerView, "swap"); }); // Bind the view model to the customer element. kendo.bind($('#searchCustomer'), customerSearch);<form id="addCustForm"><label for="txtFname">First name</label> <input id="fname" data-bind="value: firstName" class="k-textbox" /></form>// observable object of add customer var customerAdd = kendo.observable({ firstName: "Hello world!" }); // Bind the view model to the customer element. kendo.bind($('#addCustForm'), customerAdd);