Hi,
I have a grid which display items. The items are refreshed depending in the selection of a comboBox. Some of the filters are dropdownlists that display options related to the current items in the grid.
Each time the selection of the comboBox is changed I need to change the items in the grid and the filters that were accessed.
When the dropdownlists are getting reseted/refreshed the height is resetting.
The setup of the column:
The setup of the dropdownlist filter:
The setup in the columnMenuInit to reset the dropdownlist filter (some code is omitted here):
Any help will be appreciated.
Thanks.
I have a grid which display items. The items are refreshed depending in the selection of a comboBox. Some of the filters are dropdownlists that display options related to the current items in the grid.
Each time the selection of the comboBox is changed I need to change the items in the grid and the filters that were accessed.
When the dropdownlists are getting reseted/refreshed the height is resetting.
The setup of the column:
{ field: "DOSExceptionCategory", title: "DOS Exception Category", width: 150, locked: false, lockable: false, filterable: { ui: exceptionCategoryFilter }, headerAttributes: { style: "overflow: visible; white-space: normal" } }
The setup of the dropdownlist filter:
var ksslExceptionCategory = [];
function exceptionCategoryFilter(element) {
ksslExceptionCategory.push({
LocationID: selectedLocationId, Filter: element.kendoDropDownList({
dataSource: {
transport: {
read: {
dataType: "json",
url: "locations/getdosexceptioncategories",
data: function () {
return { locationID: parseInt($("#comboBoxLocation").val()) };
}
}
}
},
dataTextField: "Text",
dataValueField: "Value",
optionLabel: "--Select Value--",
height: 450
}).data("kendoDropDownList")
});
}
The setup in the columnMenuInit to reset the dropdownlist filter (some code is omitted here):
columnMenuInit: function (e) {
var popup = e.container.data("kendoPopup");
var field = e.field;
popup.bind("open", function (e) {
switch (field) {
case "DOSExceptionCategory":
$.each(ksslExceptionCategory, function (i, element) {
if (element.LocationID != selectedLocationId) {
element.LocationID = selectedLocationId;
element.Filter.dataSource.read();
}
});
break;
Any help will be appreciated.
Thanks.