or
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);