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

[Solved] TreeView inside of a jQuery UI dialog window?

4 Answers 124 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam Daniels
Top achievements
Rank 1
Sam Daniels asked on 02 Jun 2010, 02:14 PM
Has anyone attempted this?  I've placed the TreeView code inside of a hidden div?  I can get the tree to display inside of the div, but nothing is clickable, or expandable.  I'm not getting any javascript errors either, which would usually be the culprit for a problem with the tree not being clickable.

From my aspx:

<div id="test" title="Test Tree in Dialog" style="display:none"
<%= Html.Telerik().TreeView() 
    .Name("testTree"
    .ClientEvents(events => events 
        .OnSelect("onSelectTree"
        .OnLoad("onLoadTree"
        ) 
    .BindTo(Model, mappings => mappings.For<TreeNodeModel<EntityType>> 
        (binding => binding.ItemDataBound((item, treeItem) => 
            { 
                item.Text = treeItem.NodeInfo.Name; 
                item.Value = treeItem.NodeInfo.Id.ToString(); 
                item.Expanded = true
            }) 
            .Children(treeItem => treeItem.Children))) 
 %> 
</div> 

I'm then showing the dialog with something similar to:

<script type="text/javascript"
    $(function() { 
        $("#testTree").dialog(); 
    }); 
</script> 

Again, the tree displays in the dialog, but isn't usable.  Any ideas?

4 Answers, 1 is accepted

Sort by
0
Sam Daniels
Top achievements
Rank 1
answered on 15 Jun 2010, 06:58 PM
Anyone have any ideas here?
0
Atanas Korchev
Telerik team
answered on 16 Jun 2010, 06:45 AM
Hello Sam Daniels,

I created a sample project showing how to do that.

Regards,
Atanas Korchev
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Rick Stone
Top achievements
Rank 1
answered on 06 Aug 2010, 05:29 AM
So, it looks like the secret is calling the ScriptRegistar with jQuery(false).  How do you handle this if the ScriptRegistrar is your master page?  If I put jQuery(false) on that call then nothing on the site works.
0
Wai Kei
Top achievements
Rank 1
answered on 01 Oct 2010, 06:23 PM
I have the same problem. The window displays the treeview but it's not clickable or expandible. And I can't turn the jQuery to false since it's set on the master page. Is there a solution to it? Thanks a bunch.
Tags
TreeView
Asked by
Sam Daniels
Top achievements
Rank 1
Answers by
Sam Daniels
Top achievements
Rank 1
Atanas Korchev
Telerik team
Rick Stone
Top achievements
Rank 1
Wai Kei
Top achievements
Rank 1
Share this question
or