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

[Solved] Menu casuing treeview to hide when opening window

2 Answers 72 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Greg Lynne
Top achievements
Rank 1
Greg Lynne asked on 22 Sep 2011, 09:16 PM

When you use a telerik menu item in conjunction with a telerik treeview and telerik window, the window opening from the menu cause the treeview to dissapear.

Original:

<ul class="t-group t-treeview-lines"><li class="t-item t-first"><div class="t-top"><span class="t-in t-state-selected"> And LOS <= 15</span><input type="hidden" value="" name="itemValue" class="t-input"></div></li><li class="t-item t-last"><div class="t-bot"><span class="t-in">new ...</span><input type="hidden" value="" name="itemValue" class="t-input"></div></li></ul>

Changes to after call to window open: Note: wraps it in t-animation-container

<div class="t-animation-container" style="width: 280px; height: 45px; display: none;"><ul class="t-group t-treeview-lines" style="margin-left: -280px;"><li class="t-item t-first"><div class="t-top"><span class="t-in t-state-selected"> And LOS <= 15</span><input type="hidden" value="" name="itemValue" class="t-input"></div></li><li class="t-item t-last"><div class="t-bot"><span class="t-in">new ...</span><input type="hidden" value="" name="itemValue" class="t-input"></div></li></ul></div>

I am currently working around this issue by using the ".OpenOnClick(true)" function

Please see screen shots for more info:

2 Answers, 1 is accepted

Sort by
0
Greg Lynne
Top achievements
Rank 1
answered on 26 Sep 2011, 03:22 AM
This bug still occurs even when implementing .OpenOnClick(true).
Notice that the "Helper" menu item below is just calling a javascript alert(), however this still causes any MVC treeviews on the loaded page to dissapear, by being wrapped by:
<div class="t-animation-container" style="width: 0px; height: 0px; display: none;">
<%= Html.Telerik().Menu()           
     .Name("ActionMenu")
     .OpenOnClick(true)       
     .Items(menu =>
                    {                  
                        menu.Add()
                            .Text("Insert")                   
                            .Items(item =>
                                       {
                                           item.Add().Text("Calculation Contract Number").Url(url);
                                           item.Add().Text("Helper").Url("javascript:alert('Not implemented');"); 
                                       });
                    })                          
    %>

If you need any other examples then let me know.

Cheers
0
Georgi Tunev
Telerik team
answered on 28 Sep 2011, 11:11 AM
Hello Andrew,

I tried to reproduce the problem but to no avail. It might be related to a specific setup, but without having a better view over your exact configuration and logic, I cannot be sure. Could you please provide a sample project so we can investigate further?

Thank you in advance for your cooperation.

Greetings,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Menu
Asked by
Greg Lynne
Top achievements
Rank 1
Answers by
Greg Lynne
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or