Thursday, 20 December 2012

Kendo Tab Control

Using Tab control has always been an easy task to accomplish. But due to lack of sufficient documentation(IMO) of Kendo Tabstrip for MVC, it took me a while to get what i was looking for.

To begin with -
You can follow the basic documentation link of Kendo.
For everything else that was not exactly there in doc -
  1. Display image with absolute URL -  Simply use
    .ImageUrl("http://Absolute/path/of/the/image.")
  2. Display content from Partial View - I found a couple of ways for that. 
    1- .Content(@<text> @(Html.Partial("_PartialView1"))</text>);
     
    2- .Content(Html.Partial("_PartialView2").ToHtmlString());
    
    3- .Content(@<text> @(Html.Action("View3"))</text>);
  3. Change the animation from "expand" to "toggle" - 
  4. .Animation(animation =>
        {
            animation.Enable(true);
            animation.Open(config =>
            {
                config.Duration(AnimationDuration.Fast);
                config.Fade(FadeDirection.In);
            });
        })
    
  5.  Difference in LoadContentFrom  and Content in case someone is confused. 
     
Thanks,
S. Shafique
Fok at RnD Team member

No comments:

Post a Comment