This is a migrated thread and some comments may be shown as answers.

How to set popupCollision configuration property of Kendo Menu using Asp.Net Mvc HtmlHelper?

1 Answer 27 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Suraj
Top achievements
Rank 1
Suraj asked on 08 Dec 2015, 08:19 AM
The example for Kendo Menu documentation here sets the popupCollision property in Javascript. How can this property be set using Asp.Net MVC HtmlHelpers for Kendo Menu?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Dec 2015, 08:40 AM
Hello Suraj,

Please use the following approach:

@(Html.Kendo().Menu()
    .Name("Menu")
)
 
<script>
 
$(function () {
    var menu = $("#Menu").data("kendoMenu");
    menu.setOptions({ popupCollision: false });
});
 
</script>

The above code will apply the customization before any Menu item is opened, i.e. before the Menu popups are initialized.

Actually, this property should be present for the MVC wrapper too. We have added it and changes will take effect in the next internal and official Kendo UI builds. Thank you for bringing this issue to our attention.

Regards,
Dimo
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Menu
Asked by
Suraj
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or