-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom dropdown Data Source #51
Comments
Please refer to this issue: #67 |
Hi, Thank you, |
Please, take a look at: http://surveyjs.org/examples/questiontype-dropdownrestfull.html |
Hi, |
@PankajKumawat125 you may get a question and set the choices:
Thank you, |
@andrewtelnov Perfect. work fine. |
@PankajKumawat125 survey.setValue("YourQuestionName", defaultValue); example Please go through our demos. You are asking very basic questions. Thank you, |
@andrewtelnov Well, I have already done that. i was just going to delete my 2nd question. |
Hi,
i am trying to achieve a custom data source for dropdown components, which will help dropdown to be populated from a different data source rather than defining in the editor.
please have a look at the below changes, confirm if this is the right place or will it cause some other problems.
Object.defineProperty(n.prototype, "choices", {
get: function () {
debugger;
//"dataServiceURL" is a new property in dropdown property bag.
if (this.dataServiceURL != undefined) {
this.choicesValues = []; //reinitialize the Array
//loading with a different source.
this.choices = ["1|1st modified Item", "2|2nd Modified Item"];
console.log(this.choicesValues);
return this.choicesValues;
} else {
return this.choicesValues
}
},
set: function (t) {
debugger;
e.ItemValue.setData(this.choicesValues, t)
}
The text was updated successfully, but these errors were encountered: