Hi,
I have four multiSelects that contain hierarchical data so that level 4 item knows its parents in level3, level2, and level1 and so on.
Each of multiselects has their own remote dataSource. Everytime when a dataSource requests for items from server the parameterMap function reads selections from its "parent" multiselects and puts them as parameters to request. I also attach the multiSelect's search text as parameter to the request.
Like this way:
My problem is that the multiselects parameterMap function is fired only when I change the text in that particular box. In additon to that, I would also like to run parameterMap function every time when a parent-level selection changes. I know there is a 'selected' event in multiSelect widget, but how can I call parameterMap function of a multiSelects dataSource?
Olli
I have four multiSelects that contain hierarchical data so that level 4 item knows its parents in level3, level2, and level1 and so on.
Each of multiselects has their own remote dataSource. Everytime when a dataSource requests for items from server the parameterMap function reads selections from its "parent" multiselects and puts them as parameters to request. I also attach the multiSelect's search text as parameter to the request.
Like this way:
$("#level3-multiselect").kendoMultiSelect({
autoBind: false,
dataTextField: "name",
dataValueField: "id",
dataSource: {
serverFiltering: true,
transport: {
dataType: "jsonp",
read: baseurl: 'http://myurl'
parameterMap: function(options, operation) {
var _name = "";
if ('filter' in options && options.filter.filters.length > 0) {
_name = options.filter.filters[0].value;
}
return {
level1ids: getLevel1Ids().join(),
level2ids: getLevel2Ids().join(),
name: _name
}
}
},
schema: {
data: "items"
}
}
});
My problem is that the multiselects parameterMap function is fired only when I change the text in that particular box. In additon to that, I would also like to run parameterMap function every time when a parent-level selection changes. I know there is a 'selected' event in multiSelect widget, but how can I call parameterMap function of a multiSelects dataSource?
Olli