How would I bring in a select drop down into one of my Kendo ui grid columns using remote data?
The documentation is very limited on this subject, specifically with my requirement which is:
To have a list of options from my PHP/MySQL script populate the drop down menu.
If one of those options is already set based on a query in the database, have that option in the menu already selected.
Based on the answer provided I now have the following, but it is not working. I get a dropdown list with a load of options all 'undefined':
function categoryDropDownEditor(container, options) {
$('<input required data-text-field="'+options.field+'" data-value-field="'+options.field+'" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: false,
dataTextField: "text",
dataValueField: "value",
dataSource: {
type: "POST",
transport: {
read: ROOT+"user/branch-list"
}
},
index: 0
});
}
My PHP script just returns JSON like so:
[{text: "Germany", value: "1"}]
data-text-field
anddata-value-field
from the input definition. – OnaBai