PanelBar Bug changing Title?

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    3 posts
    Member since:
    Jun 2015

    Posted 22 Jun 2015 Link to this post

    I can change any title of a panel like this

                                   //var li = panelbar.wrapper.find("> li:first span.k-link.k-header");
                                    var li = panelbar.wrapper.find("> li:nth(1) span.k-link.k-header");
                                    li.contents().first().replaceWith("New Name");

     

    But it does not work if the paenlBar contains this a .Content(@<text> </text>); in the parent panel bars.

      @(Html.Kendo().PanelBar()
                .Name("panelbar")

                  .Items(panelbar =>
             {
                 panelbar.Add().Text("First Person")

                      .Content(@<text>

                        @Html.TextBoxFor(m => m.firstName, new { @class = "input k-textbox"})

                    </text>);

             })

    )

    Why is this?

    Thanks

     

     

  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 23 Jun 2015 Link to this post

    Hello Andrey,

    You can use the following snippet to modify the header when using <text> rendering:

    panelbar.wrapper.find(".k-header:first").text("foo")

    Regards,
    Genady Sergeev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Andrew
    Andrew avatar
    3 posts
    Member since:
    Jun 2015

    Posted 23 Jun 2015 in reply to Genady Sergeev Link to this post

    Thank you that works great for the first header. How do I access the second and third...etc. 

    I tried this and it updates all panels?

    panelbar.wrapper.find(".k-header:nth-child(1)").text("foo")

  5. Andrew
    Andrew avatar
    3 posts
    Member since:
    Jun 2015

    Posted 23 Jun 2015 in reply to Genady Sergeev Link to this post

    Been able to update the title from the currently selected panel would do what I require?

    Thank you

Back to Top
Kendo UI is VS 2017 Ready