I'm trying to dynamically populate the dropdown list on the grid filter popup. A
sample of my approach so far.
filterMenuInit: function(e){
if(e.field === "City"){
e.container.data("kendoPopup").bind("open", function() {
var ddl = e.container.find("input").data("kendoDropDownList");
var ds = ddl.dataSource.data();
ds.push('Another City');
ddl.setDataSource(new kendo.data.DataSource({
data: ds
}));
});
}
}
This seems to be working to update the list just fine. However, the height of the dropdown is getting messed up after subsequent updates. The first time it opens, a scrollbar is correctly shown. Each time thereafter, the height is 'auto' and no longer shows a scrollbar. I believe I've isolated the
cause down to the popup deliberately calculating height on first open but never again after.
Changing the .one() call to a .bind() fixes the scrolling issue but I'd like a solution that doesn't involve manually tweaking internal Kendo UI code. Is there a better workaround that will force the popup to recalculate its height on open?