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

Tabstrip filling out items programatically server side

1 Answer 95 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 03 Oct 2013, 01:53 PM
Good morning.
I have a question.
What will be the approach to use the tab strip in order to programitally create the tabs and inside them have custom urls that are also set on the server side.
Right now  my controller is returning a tab object that contains the information
 public class Tab
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Url { get; set; }
        public bool Visible
        {
            get;
            set;
        }

        public string UserName{ get; set; }

        public Tab()
        {
            Visible = true;
        }
    }


@model List<Tab>
@(Html.Kendo().TabStrip()
    .Name("tabstrip") 
    .BindTo(Model,(item,category)  =>
    {
        item.Text = category.Name;
    })
    
So how do i map the content url of the tabs. I say content because the html is retrieved as the user clicks on the tabsand not all at once.

    

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 07 Oct 2013, 01:09 PM
Hello,

If you wish to set the URL from which the tab content should be loaded then you can use the TabStripItem ContentUrl property e.g.

.BindTo(Model,(item,category)  =>
{
    item.Text = category.Name;
    item.ContentUrl = category.Url;
})
Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TabStrip
Asked by
Ed
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or