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

[Solved] Expanding Top-Level Does Not Show Sub Items

0 Answers 80 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.
Jeff
Top achievements
Rank 1
Jeff asked on 05 Jan 2012, 10:13 PM
I'm using Q3 2011 code base. Even though the rendered html shows all elements, for some reason, the 2nd level is set to "display:none" even though I'm clicking to expand. Code and html snippet to follow. Here is my view snippet:

@(Html.Telerik().TreeView()
                        .Name("UserIndustryInterestsInput")
                        .ShowCheckBox(true)
                        .Items(item =>
                        {
                            item.Add()
                                .Value("ALL")
                                .Text("ALL")
                                .Items(si =>
                                    {
                                        si.Add()
                                            .Value("1")
                                            .Text("1");
                                        si.Add()
                                          .Value("2")
                                          .Text("2");
                                        si.Add()
                                            .Value("3")
                                            .Text("3");
                                        si.Add()
                                            .Value("4")
                                            .Text("4");
                                        si.Add()
                                            .Value("5")
                                            .Text("5");
                                        si.Add()
                                            .Value("6")
                                            .Text("6");
                                        si.Add()
                                            .Value("7")
                                            .Text("7");
                                    });           
                        })
                    )


I do see ALL, but when I expand, I do not see my sub items. When using firebug, I can see the rest of the items in the <ul> list but they are set to display:none even when I expand top level. Here is the rendered html snippet:
<ul class="t-group" style="display: block;">
<li class="t-item" style="line-height: 0; cursor: pointer;">
<div class="t-top">
<span class="t-checkbox" style="display: none;">
<span class="t-in" style="display: none;">1</span>
<input class="t-input" type="hidden" value="1" name="itemValue">
</div>
</li>
<li class="t-item" style="line-height: 0; cursor: pointer;">
......

From your site's demo, display:none is not there at all. In my case, it shows up somehow (I tried setting Visible to true for each sub item to no avail). Why are the nested spans set to display:none?

Please point me in the right direction. I've been banging my head against the wall for the past couple days to no avail.

Thank you in advance.
Tags
TreeView
Asked by
Jeff
Top achievements
Rank 1
Share this question
or