Hi,
I've set up a Kendo Grid, and am customising the filter interface to show all values in a DropDownList. Through the DropDownList DataSource object I'm grouping on the field to be displayed (thereby removing any duplicates).
This works fine and shows exactly those values which should show, however on selecting a value I get an error in the kendo.all.js change function at the following line:
sourceValue = sourceItem.get(field);
The error being "Object doesn't support property or method 'get'"
Is this a bug in Kendo, or am I doing something wrong?!
For reference, the DropDownList is set up using the following code which is called from the filter UI function for each individual column (this applies to several columns). The filter function is there to filter the values based on all filters applied to the grid (i.e. so each filter only shows those values which are currently present in the grid according to applied filters):
function
setFilter(url, element, field) {
element.kendoDropDownList({
dataSource: {
transport: {
read: {
url: url,
data: {
filter:
function
() {
var
filters = $(
"#AccountsGrid"
).data(
"kendoGrid"
).dataSource.filter();
var
result = {};
if
(filters) {
result.logic = filters.logic;
var
filterArray =
new
Array();
for
(
var
i = 0; i < filters.filters.length; i++) {
filterArray.push({
operator: filters.filters[i].operator,
field: filters.filters[i].field,
value: filters.filters[i].value
});
}
result.filters = filterArray;
}
return
JSON.stringify(result);
}
}
}
},
group: {
field: field
},
serverFiltering:
true
},
dataValueField:
"value"
,
dataTextField:
"value"
,
optionLabel:
"--Select Value--"
});
}