I am passing a value from a param from a click event, which works fine;
<a data-bind="events: { click: roomselect }" data-target="detailPane">#: desc# </a>
but I want to get this value to another method within the view-model. I was trying to use "set " but it does not assign the value.
(I am trying to get the value to the line in the method init below: url: "http://myURL/api/room/" + this.roomSelected + "/children",)
RoomsViewModel = kendo.data.ObservableObject.extend({
roomsDS: null,
roomDS:null,
roomSelected: null,
roomselect: function(e) {
var that = this;
that.set("roomSelected", e.data.id);
},
init: function () {
var that = this, roomDataSource;
kendo.data.ObservableObject.fn.init.apply(that, []);
roomDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "http://myURL/api/room/" + this.roomSelected + "/children",
dataType: "json",
type: "GET"
},
.......
<a data-bind="events: { click: roomselect }" data-target="detailPane">#: desc# </a>
but I want to get this value to another method within the view-model. I was trying to use "set " but it does not assign the value.
(I am trying to get the value to the line in the method init below: url: "http://myURL/api/room/" + this.roomSelected + "/children",)
RoomsViewModel = kendo.data.ObservableObject.extend({
roomsDS: null,
roomDS:null,
roomSelected: null,
roomselect: function(e) {
var that = this;
that.set("roomSelected", e.data.id);
},
init: function () {
var that = this, roomDataSource;
kendo.data.ObservableObject.fn.init.apply(that, []);
roomDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "http://myURL/api/room/" + this.roomSelected + "/children",
dataType: "json",
type: "GET"
},
.......