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

[Solved] need help with panelBar and partial view

3 Answers 117 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.
georges
Top achievements
Rank 1
georges asked on 18 Feb 2011, 11:09 PM

i have a panelBar and i am trying to add a partial view to it in razor. how can i do that?

@html.partial("file") is not working
.Content is not working unless i put @ sign and it wont let me position my controls
.loadContentFile is not working, please need help

@( Html.Telerik().PanelBar()

.Name(

 

"PanelBar")

 

 

.HtmlAttributes(

 

new { style ="width:900px;text-align:left" })

 

 

.ExpandMode(

 

PanelBarExpandMode.Multiple)

 

 

.Items(panelbar => {

 

panelbar.Add()

 

.Text(

 

"GENERAL")

 

 

.Expanded(

 

true);

 

 

panelbar.Add()

 

.Text(

 

"FUNDING/DATES")

 

 

.Items(parent =>

 

{

 

 

 

})

 

.Expanded(

 

false);

 

 

panelbar.Add()

 

.Text(

 

"INDICATORS")

 

 

.Items(parent =>

 

{

 

 

 

})

 

.Expanded(

 

false);

 

 

panelbar.Add()

 

.Text(

 

"DETAIL")

 

 

.Items(parent =>

 

{

 

 

 

})

 

.Expanded(

 

false);

 

 

panelbar.Add()

 

.Text(

 

"STATUS/MISC")

 

 

.Items(parent =>

 

{

 

 

 

})

 

.Expanded(

 

false);

 

 

})

 

 

 

)

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 21 Feb 2011, 08:32 AM
Hi gergi,

 You can check the razor panelbar examples. The "View" tab of the codeviewer shows the razor syntax for the current demo.

Regards,
Atanas Korchev
the Telerik team
0
georges
Top achievements
Rank 1
answered on 21 Feb 2011, 04:57 PM
i see those example but none applies to what i need to do. is it doable to have a file imported into the telerick panel in razor? and do you have an example please that do that. it is really important to us for this to succeed , we have a demo this friday and i need to convince management to buy these controls. 
again if you can post an example of one file in cshtml being imported or partial view to a panel in a different cshtml file i wouls really appreciate it. i got to a point where i can plug html code in there but i cannot control the position from CSS . is there a reason why? thanks again
0
Atanas Korchev
Telerik team
answered on 21 Feb 2011, 05:00 PM
Hello gergi,

 The load on demand example shows how to load a partial view in the panelbar.

Regards,
Atanas Korchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
PanelBar
Asked by
georges
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
georges
Top achievements
Rank 1
Share this question
or