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

[Solved] Panelbar used to dynamically load view into splitter pane

1 Answer 71 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.
David
Top achievements
Rank 1
David asked on 24 Aug 2011, 01:07 PM

Hi,

Im trying to get the following to work but I don't know if it's even possible with the telerik mvc controls.  I have a splitter with 2 panes.  The left contains a panelbar that I'd like to use as a menu.  At the moment the first item in the panelbar has an action that means when it's clicked it does a page refresh to another url.  Is it possible to have the panelbar dynamically load the content of the right hand pane with another view without refreshing the entire page?

Look forward to any help.

Regards
David


Html.Telerik().Splitter().Name("Splitter1")
            .Orientation(SplitterOrientation.Horizontal)
             
            .Panes(hPanes => {               
                hPanes.Add()                   
                    .Size("300px")                   
                    .Collapsible(false)                   
                    .Resizable(false)
                    .Content(() => {
 
                        Html.Telerik().PanelBar()
                            .Name("PanelBar")
                            .HtmlAttributes(new { style = "height: 100%; border: 0;" })
                            .ExpandMode(PanelBarExpandMode.Single)
                            .SelectedIndex(0)
 
                            .Items(item =>
                            {
                                item.Add()
                                    .Text("Administration")
                                    .ImageHtmlAttributes(new { alt = "Mail Icon" })
                                    .Items(subItem =>
                                    {
                                        subItem.Add()
                                            .Text("Manage Class Types")
                                            .Action("Index", "Home")
                                            .ImageHtmlAttributes(new { alt = "Manage Class Types" });
 
                                        subItem.Add()
                                            .Text("My Folders")
                                            .ImageHtmlAttributes(new { alt = "Personal Folders Icon" });
                                    });
                                item.Add()
                                    .Text("Reliability")
                                    .Items(subItem =>
                                    {
                                        subItem.Add()
                                            .Text("View Reliability Data")
                                            .ImageHtmlAttributes(new { alt = "Personal Folders Icon" });
 
                                        subItem.Add()
                                            .Text("My Folders")
                                            .ImageHtmlAttributes(new { alt = "Personal Folders Icon" });
                                    });
                            }).Render();
                         
                         
                    });
 
                hPanes.Add()                   
                    .Collapsible(false)
                    .Resizable(false)                
                    .Content(() => {%>                       
                    <p>Outer splitter : bottom pane</p>
                    <%});                                                                                                                                                                                                                                                             
            })
             
            .Render();

 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Aug 2011, 10:24 AM
Hi David,

I believe that the following Code Library will be of help:
http://www.telerik.com/community/code-library/aspnet-mvc/general/using-panelbar-to-load-partial-views-in-splitter-s-pane.aspx


Kind regards,
Georgi Tunev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
PanelBar
Asked by
David
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or