Set intial view to remote (partial) view using MVC wrappers

2 posts, 0 answers
  1. Bryan
    Bryan avatar
    2 posts
    Member since:
    Apr 2015

    Posted 01 May 2015 Link to this post

    I'd like to load the first item in my MobileTabStrip (a remote partial view) by default. How can I accomplish this?  Right now, the application works but I have to click on a tab strip item to load content.

     

    My mobile layout is like the following:

    @{ Html.Kendo().MobileLayout()
    .Name("Test")
    .Footer(() =>
    {
    Html.Kendo().MobileTabStrip()
    .Items(items =>
    {
    items.Add().Icon("globe").Text("Stuff").Url(@Url.RouteUrl(new { Controller = "Controller1", Action = "Index" }));
    items.Add().Icon("contacts").Text("Some other stuff").Url(@Url.RouteUrl(new { Controller = "Controller2", Action = "Index" }));
    })
    .Render();
    })
    .Render();
    }

     

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 05 May 2015 Link to this post

    Hello Bryan,

    You can either specify the selected index, navigate to that page with a certain URL that will load the desired tab or use the switchTo method.

    Regards,
    Alexander Popov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top