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

[Solved] Disable collapse MVCPanelBar When Header Already Open

1 Answer 8 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dimitri
Top achievements
Rank 1
Dimitri asked on 27 Jun 2011, 12:15 PM
Hi There,

I'm working with the mvc panelbar and i would like to disable/ turn off the collapse behaviour like in this example

http://demos.telerik.com/aspnet-mvc/razor/panelbar/clientsideapi

When a user click on the header the first time it expends if the user click again on the same header the panel does not collapse.

I would like what the best way to implement that because i tried this
function onCollapse(e) {
    var item = $(e.item);
    var panel = $("#EmploymentCompensationPanelBar").data("tPanelBar"); 
    var item = $("li:first", panel.element)[0]; //DOM element 
    panel.expand(item);
}

and it's not really nice cause i can see the panel collapse and then expand.

1 Answer, 1 is accepted

Sort by
0
Dimitri
Top achievements
Rank 1
answered on 27 Jun 2011, 12:19 PM
I found it i forgot to use 
.ExpandMode(PanelBarExpandMode.Single)
Tags
General Discussions
Asked by
Dimitri
Top achievements
Rank 1
Answers by
Dimitri
Top achievements
Rank 1
Share this question
or