Hi,
I am having a few problems and so far are unable to find an example which integrates the basic MVVM regsistration example with a datasource which posts the registration details servier side using Create.
Is anybody able to provide a working example?
var viewModel = kendo.observable({
assessmentDateSource: new kendo.data.DataSource({
transport: {
create: {
url: crudServiceBaseUrl + "/Assessment/Create",
type: "POST"
},
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return {
models: kendo.stringify(options.models)
};
}
return options;
}
}, batch: true,
schema: {
model: {
id: "AssessmentId"
}
}
}),
firstname: "",
lastname: "",
create: function () {
//Datasource is empty here do I some how have to push the viewmodel into the datasource?
this.assessmentDateSource.sync();
}
});
Thanks in advance