DropDownList within a PanelBar

2 posts, 0 answers
  1. Marc
    Marc avatar
    1 posts
    Member since:
    May 2017

    Posted 09 May Link to this post

    Hi

    How do insert a DropDownList within a PanelBar?
    I have the following code but it does not work:

     

    I'm using version 2017.1.118
      
    Thanks!

    @(Html.Kendo().PanelBar()
          .Name("panelForm")
          .ExpandMode(PanelBarExpandMode.Single)
          .Items(panelbar =>
          {
              panelbar.Add().Text("My Teammates")
                      .Expanded(true)
                      .Content(@<text>
                                @(Html.Kendo().DropDownList()
                                      .Name("size")
                                      .BindTo(new List<string>()
                                      {
                                        "S - 6 3/4\"",
                                        "M - 7 1/4\"",
                                        "L - 7 1/8\"",
                                        "XL - 7 5/8\""
                                      })
                                      .HtmlAttributes(new { style = "width: 100%" })
                                      .Deferred()
                                                    )
                               </text>);
          })
          .Deferred()
    )
  2. Dimitar
    Admin
    Dimitar avatar
    176 posts

    Posted 10 May Link to this post

    Hello Marc,

    From the example provided I can see that you are trying to use deferring initialization. I can confirm that there is a known bug in the Kendo ASP.NET Core Wrapper and you can start tracking the progress we make on it from here.

    As a temporary workaround you can use the solution from the attached file (TelerikAspNetCorePanelBar.zip). You will notice that I have used the LoadContentFrom() method to load the _DropDownList partial view on demand.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top