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

2 posts, 0 answers
  1. Suraj
    Suraj avatar
    6 posts
    Member since:
    Jun 2014

    Posted 08 Dec 2015 Link to this post

    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?
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 11 Dec 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top