Hi,
I am trying to add a new row to a grid using the inline editor. One of the columns is a drop down list. I think it is setup properly. When the drop down list control loses focus, the cell reverts from the text value to the option value. How do you structure the drop down list to keep the text and not replace the cell with the value?
Any tips on why the drop down leaves the value behind and not the text much appreciated.
I am trying to add a new row to a grid using the inline editor. One of the columns is a drop down list. I think it is setup properly. When the drop down list control loses focus, the cell reverts from the text value to the option value. How do you structure the drop down list to keep the text and not replace the cell with the value?
function
vendorDropDownEditor(container, options) {
$(
'<input data-text-field="name" data-value-field="id" data-bind="value:'
+ options.field +
'"/>'
)
.appendTo(container)
.kendoDropDownList({
dataTextField:
"name"
,
dataValueField:
"id"
,
autoBind:
false
,
dataSource:
[{"id":1,"name":"aaa"},{"id":2,"name":"bbb"},{"id":3,"name":"ccc"},{"id":4,"name":"ddd"},{"id":5,"name":"eee"},{"id":6,"name":"fff"}]
});
}
Any tips on why the drop down leaves the value behind and not the text much appreciated.