Editor not showing within tabstrip

3 posts, 0 answers
  1. Mike
    Mike avatar
    2 posts
    Member since:
    Jan 2012

    Posted 06 Jun 2013 Link to this post

    Has anyone successfully placed the RadEitor within a TabStrip control. ? The Radeditor is always displayed outside of the tabstrip at the top of the form (see attached image).

    //sample code
    @(Html.Kendo().TabStrip()
        .Name("configuration")
        .SelectedIndex(0)
        .Items(tabstrip =>
         {
         tabstrip.Add()
             .Text("General Settings")
             .Content(@<text>
                       @Html.LabelFor(model => model.Appcutoffdate)    
                       @Html.EditorFor(model => model.Appcutoffdate)           
                   </text>);
         tabstrip.Add()
            .Text("Email")        
            .Content(@<text>
                       @{ Html.Kendo().EditorFor(model => model.EmailAcceptBody)
                          .Name("EmailAcceptBody")
                          .Encode(false)
                          .Render();                                                                              
                          }            
                   </text>);
         })
    )


    Thanks
    Mike
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 10 Jun 2013 Link to this post

    Hello Mike,


    To achieve this you should initialize the TabStrip in a code block too and call it's Render() method.
    E.g.
    @{Html.Kendo().TabStrip()
        .Name("configuration")
        .SelectedIndex(0)
        .Items(tabstrip =>
         {
             tabstrip.Add()
                 .Text("General Settings")
                 .Content(@<text>
                       ...     
                   </text>);
             tabstrip.Add()
                .Text("Email")
                .Content(@<text>
                       @{ Html.Kendo().Editor()
                          .Name("EmailAcceptBody")
                          .Encode(false)
                          .Render();                                                                             
                          }           
                   </text>);
         })
         .Render();
    }

    I wish you a great day!

     

    Regards,
    Dimiter Madjarov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Mike
    Mike avatar
    2 posts
    Member since:
    Jan 2012

    Posted 12 Jun 2013 Link to this post

    Thanks Dimiter - that did the trick !

    Regards
    Mike
Back to Top