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

PanelBar will not collapse

3 Answers 35 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Mark Mergler
Top achievements
Rank 1
Mark Mergler asked on 19 Mar 2010, 04:40 PM
Hi

I have a data bound PanelBar that will not collapse.

This is the rendered HTML

<div id="ctl00_Main_nav1_RadPanelBar2" class="RadPanelBar RadPanelBar_mresource" style="height:300px;"
    <ul class="rpRootGroup"
        <li class="rpItem rpFirst"><href="./" class="rpLink"><span class="rpOut"><span class="rpText">Home</span></span></a></li
        <li class="rpItem"><href="reporting/" class="rpLink"><span class="rpOut"><span class="rpText">Dashboard</span></span></a></li
        <li class="rpItem"><href="#" class="rpLink rpExpandable rpExpanded"><span class="rpOut"><span class="rpText">Reporting</span></span></a><div class="rpSlide" style="display:block;"
            <ul class="rpGroup rpLevel1 " style="display:block;"
                <li class="rpItem rpFirst"><href="pages/c.aspx" class="rpLink"><span class="rpOut"><span class="rpText">SMS Applicants</span></span></a></li
                <li class="rpItem"><href="reporting/conversion/" class="rpLink"><span class="rpOut"><span class="rpText">Conversion Rate</span></span></a></li
                <li class="rpItem"><href="reporting/source/" class="rpLink"><span class="rpOut"><span class="rpText">Candidate Source</span></span></a></li
                <li class="rpItem"><href="reporting/livesms/" class="rpLink"><span class="rpOut"><span class="rpText">Live SMS</span></span></a></li
                <li class="rpItem"><href="reporting/poll/" class="rpLink"><span class="rpOut"><span class="rpText">Poll Results</span></span></a></li
                <li class="rpItem rpLast"><href="reporting/mapping/" class="rpLink"><span class="rpOut"><span class="rpText">Mapping</span></span></a></li
 
            </ul> 
        </div></li><li class="rpItem rpLast"><href="#" class="rpLink rpExpandable rpExpanded"><span class="rpOut"><span class="rpText">Campaign Tools</span></span></a><div class="rpSlide" style="display:block;"
            <ul class="rpGroup rpLevel1 " style="display:block;"
                <li class="rpItem rpFirst rpLast"><href="pages/v.aspx" class="rpLink"><span class="rpOut"><span class="rpText">Visitors</span></span></a></li
            </ul> 
        </div></li
    </ul><input id="ctl00_Main_nav1_RadPanelBar2_ClientState" name="ctl00_Main_nav1_RadPanelBar2_ClientState" type="hidden" /> 
</div> 

And this is the code that created it

<telerik:RadPanelBar runat="server" ID="RadPanelBar2" Height="300px"  EnableEmbeddedSkins="false" Skin="mresource" 
         DataFieldID="MenuItemId" DataFieldParentID="ParentID"  > 
        <DataBindings> 
        <telerik:RadPanelItemBinding Depth="0"  TextField="Text"  NavigateUrlField="NavigateURL" ExpandedField="Expanded" /> 
        <telerik:RadPanelItemBinding Depth="1" TextField="Text" NavigateUrlField="NavigateURL"  /> 
        
        </DataBindings> 
        </telerik:RadPanelBar> 
 
I have created a version of the PanelBar manually entering the items and the rendered html is the same, but the expanded items collapase.

The difference that I can see is that in the databound version I pass in a NULL as the NavigateURL for the items I want to collapse where as on the static version I do not use the NavigateURL attribute at all.

Thanks

Mark

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 23 Mar 2010, 01:28 PM
Hi Mark Mergler,

Can you try removing the NavigateUrlField="NavigateURL" from the databinding expression of the level 0:

<telerik:RadPanelItemBinding Depth="0"  TextField="Text"  ExpandedField="Expanded" />



Best wishes,
Veskoni
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
Mark Mergler
Top achievements
Rank 1
answered on 23 Mar 2010, 01:50 PM
Hi

I have investigated further and this issue seems to be due to something related to the script manager.  The PanelBar was within a control (nav.ascx) and it worked fine when it was manulalty built, ie not data bound.

When I used a datasource and did the databinding in nav.ascx.vb that is when the collapse stopped working.

I have now moved the PanelBar code from nav.ascx and put it directly onto the aspx page that the ScriptManager is declared on and it works with the data binding.

I am having the same issue with a Grid now, this is on a separate aspx page and the ScriptManager is declared on a master page.

When I bind the datasource for the Grid on the aspx.vb page the filtering etc does not work, but if I have the data source on the aspx page it does.

I'm very confused.

Mark
0
Veselin Vasilev
Telerik team
answered on 25 Mar 2010, 04:12 PM
Hello Mark Mergler,

This is really strange.
If you could reproduce the problem in a simple project and send it to us - we will be able to inspect it locally and find the cause of the problem.


Kind regards,
Veskoni
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.
Tags
PanelBar
Asked by
Mark Mergler
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Mark Mergler
Top achievements
Rank 1
Share this question
or