|
write: function () {
countryObj = new DropDownList({
dataSource: country,
fields: { value: "countryId", text: "countryName" },
change: function (args) {
window.callfunction.getDistrict(countryObj.value); //pass the value here
stateObj.enabled = true;
let tempQuery = new Query().where(
"countryId",
"equal",
countryObj.value
);
stateObj.query = tempQuery;
stateObj.text = null;
stateObj.dataBind();
},
placeholder: "Select a country",
floatLabelType: "Never",
});
countryObj.appendTo(countryElem);
}
. . . . . . . . .
. . . . . . . . .
},
methods: {
dataBound: function (e) { //dataBound event of Grid
window.callfunction = this; //store this value in window
},
getDistrict: function (args) {
console.log(args); //using this argument you can access the value
},
},
|