This is a migrated thread and some comments may be shown as answers.

DropDownList within a PanelBar

1 Answer 287 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 09 May 2017, 02:31 PM

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()
)

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 May 2017, 11:11 AM
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.
Tags
PanelBar
Asked by
Marc
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or