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

[Solved] having trouble expanding

1 Answer 99 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 09 Nov 2009, 01:29 AM
Hello,

Have this setup:

<%

Html.Telerik().PanelBar().Name(

"Customers2")

 

.ExpandMode(

PanelBarExpandMode.Multiple)

 

.SelectedIndex(0)

.Items((items) =>

{

 

foreach (var customer in Model)

 

{

items.Add()

.Text(

string.Concat("Customer: ", customer.Name, " (", customer.Key, ")"))

 

.Items((subitems) =>

{

subitems.Add().Text(

"Customer Details");

 

subitems.Add().Text(

"Find Address");

 

subitems.Add().Text(

"Employment Info");

 

});

}

}).Render();

%>

For whatever reason, when I click on the items, it's not expanding or collapsing at all; it just says as it is...  also, I notice that it's using the UL... seems like a CSS issue; can't find anything in your demos where I need to define certain stylesheets?  What else do I need to add to get this to work?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Nov 2009, 08:38 AM
Hello Brian,

I suppose that you will need to add ScriptRegistrar, which will create the client object of the PanelBar. The best place is to put it in the end of the master page (or in the end of the view). Here is a code snippet showing how to accomplish this task:
    <%= Html.Telerik().ScriptRegistrar() %>
</body>
</html>


Best wishes,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
PanelBar
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or