Problem with @(Html.Kendo().Menu().OpenOnClick(true)

1 Answer 59 Views
ExpansionPanel Menu View
José Ignacio
Top achievements
Rank 1
José Ignacio asked on 06 Sep 2022, 01:43 PM

Hi,

When I add .OpenOnClick(true) to my menu and I click on the menu to display the submenu, the page reloads automatically.

Do I need to add another instruction to prevent the page reloading? What's the problem?

 

Thank's in advance.

 

Ignacio

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 09 Sep 2022, 12:18 PM

Hi Ignacio,

 

Thank you for writing to us.

Can you modify the following live sample to demonstrate the mentioned problem and share the new URL back with me?
https://netcorerepl.telerik.com/GcuZEXlQ17UJ29IM23

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Maria
Top achievements
Rank 1
commented on 21 Jun 2023, 02:44 PM

Hi Eyup,

I have the same problem. In your example first time you should really click, then submenu are automatically displayed without click

Anton Mironov
Telerik team
commented on 22 Jun 2023, 01:27 PM

Hi Maria,

Could you please share more details about the issue? I tried the example above and I can not see any sub-menus.

Looking forward to hearing back from you.

Kind Regards,
Anton Mironov

Maria
Top achievements
Rank 1
commented on 22 Jun 2023, 01:48 PM | edited

should be: submenu items should be shown only and always by click on menu item

now:  for a first time submenu items will be show by click on menu item, then if mouse will be moved to the other menu item, submenu items will be show automaticallyonly by mouse move (withouth mouse click)

In your example: click on 1 menu item -> will be schow subitems, then move mouse to other menu item

openonClick works only 1 time

Aleksandar
Telerik team
commented on 27 Jun 2023, 07:39 AM

The OpenOnClick configuration allows you to configure the behavior of root items and sub menus:

.OpenOnClick(oc=>oc.RootMenuItems(true).SubMenuItems(true))

With the above configuration set the root items and sub menus will be opened on click, as demonstrated in this screencast.

I hope this helps.

Maria
Top achievements
Rank 1
commented on 27 Jun 2023, 08:44 AM

Hi Aleksandar,

thanks, it works as expected!

Tags
ExpansionPanel Menu View
Asked by
José Ignacio
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or