I have a kendo data source is bound to the grid using declarative style binding "data-bind="source: ". I currently built my view along the lines of the grid-crud code library project using MVVM. I have the following questions
- I create a sepereate html <section> and bound the elements to the view model. On the create button i did a kendo data source add. However this adds to the grid collection and does not call my controller method bound to my transport. How can i make the add call the transport?
- Is there an example (jsfiddle,jsgrid,codelibrary etc) which shows a form for the grid outside the confines of the grid. I cannot use the popup template as my behavior is such that the original grid should be hidden on click of an edit command. Please advise
var viewModel = kendo.observable({
ordersSource: statesDataSource,
isActive: true,
tabSelected: function (e) {
var selectedTab = $(e.item).text().trim();
this.set("isActive", (selectedTab === "Active"));
},
stateName: "",
stateAbbreviation: "",
isActive: true,
createState: function () {
debugger;
statesDataSource.add({
stateLookupID: 0,
stateName: viewModel.get("stateName"),
StateAbbreviation: viewModel.get("StateAbbreviation"),
isActive: viewModel.get("isActive")
});
}
});