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

[Solved] Tabstrip on base controller and one tab to each view in child controller or masterpage!!!

1 Answer 84 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marco
Top achievements
Rank 1
Marco asked on 19 Feb 2010, 03:30 PM
Hello i'm relative newbie using asp.net mvc and also on your extensions.

i'm a desktop men :)  i have more experience developing apps for desktop that in developing web apps but this time i need a web app so i want to use some ui techniques that i normally use on desktop environments.

I was wondering if i can build a tab system in my master-page and maintain opened tabs in memory avoiding to recreate it on every post or get action. 

i was thinking in a tab strip on my master-page and  one tab for each view of any controller.

let me be more explicit using an example.

think on a e-commerce app:

Client controller: will have several views, for example one to create a client and another for editing.
Order controller: will have one view for basic details and another for products specification , like what products and how many...

All i want to do is to create a tab-strip on master-page and then on view create a tab and add it to master-page tabstrip.

but as far as i know i should not make a view communicate whit controller, so how can i do this?

have a base controller whit the tab-strip and than on the child controls add the tab to it?

regarding to tabs in memory i was thinking in maintain my business objects in a singleton object and then release  it wherever i want

I Hope someone can help me.

Best Regards

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 22 Feb 2010, 08:51 AM
Hi Marco,

You can achieve your goal if you create TabStrip component in the master page which you should render in the moment where no more tabs will be added. In other words you should render the tabstrip in the views. To get the same tabstrip in the view you should place it in the TempData when it is created in the master page. Here are some code snippets which describes what I mean:
[Master-page]:
<div>
    <%
        TempData["tabStrip"] = Html.Telerik().TabStrip()
                           .Name("TabStrip")
                           .ToComponent();
    %>
</div>

[View]:
<%
    TabStrip tabstrip= TempData["tabStrip"] as TabStrip;
    if (tabstrip!= null) {
        tabstrip.Items.Add(new TabStripItem { Text = "Added from Index" });
        tabstrip.Render();
    }
%>

All the best,
Georgi Krustev
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
TabStrip
Asked by
Marco
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or