Reputation: 809
As I am using KendoUI for development of my application.I have used Multiple Grid in my application.My Problem is that i want to disable the animation for filter option that is when we click on each column for filter the menu is slide down giving us various options to filter. I want to disable the animation when i click that column for filtration that option must not slide down. Here i am adding an Image.
Upvotes: 2
Views: 1740
Reputation: 1042
The above answer was useful to me, however for how we were using kendo grid, the grid's column menu brought up another submenu (as seen here http://demos.telerik.com/kendo-ui/grid/column-menu). It turns out that though the initial dropdown is of Kendo type "Popup", the sub-menu is of Kendo type "Menu". So if you also want the sub-menu to have no animation, you would add these lines:
kendo.ui.Menu.fn.options.animation.open.duration = 0;
kendo.ui.Menu.fn.options.animation.close.duration = 0;
Alternatively, you can disable the animation with the shorthand of animation = false, so the final result could be:
kendo.ui.Popup.fn.options.animation = false;
kendo.ui.Menu.fn.options.animation = false;
Again note that this will turn off animations for all popups and menus.
Upvotes: 0
Reputation: 18402
I don't think there are "official" configuration options for this. You can disable it for all popups like this:
kendo.ui.Popup.fn.options.animation.open.duration = 0;
kendo.ui.Popup.fn.options.animation.close.duration = 0;
(demo)
Note that this will affect other widgets as well (e.g. the dropdowns inside the filter menu), so you may need to explicitly set the animation config for those if you need it. An alterative would be to set the animation for all filter menus (there is one per column), for example like this:
$(".k-grid-header").find("th").each(function () {
var menu = $(this).data("kendoFilterMenu");
var init = menu._init;
menu._init = function () {
init.apply(this, arguments);
this.popup.options.animation.open.duration = 0;
this.popup.options.animation.close.duration = 0;
};
});
(demo)
Upvotes: 2