Kendo Dropdown List Inside Panel Bar Not Initializing After CSP

0 Answers 6 Views
DropDownList PanelBar
Anupriya
Top achievements
Rank 1
Anupriya asked on 04 Sep 2025, 02:29 PM

Problem:
After enabling Content Security Policy (CSP), Kendo DropDownLists inside a PanelBar fail to initialize. On page load:
• The DropDownList renders as a plain input box.
• PanelBar items appear empty, and data binding does not happen.
• JavaScript access to the DDL fails.

Scenario:
ASP.NET MVC Razor.
• Dropdown Lists inside PanelBar content templates.
• Worked fine before CSP; now initialization and binding fail.

 

Expected Behavior:
• DDL should initialize and bind data on content load even with CSP.
• PanelBar items should display properly.

 

Example:

@(
                     Html.Kendo().PanelBar()
                     .Name("panelbar")
                     .ExpandMode(PanelBarExpandMode.Multiple)
                     .Items(panelbar =>
                     {
                         panelbar.Add().Text("Note : Please fill all the input")
                         .Content(@<text>
        @(Html.Kendo().DropDownList()
                                            .Name("dropdown")
                                            .OptionLabel("Please Select")
                                            .OptionLabelTemplate("<span style='color:dimgrey;font-size:10px;font-weight:bold'>Please Select</span>")
                                            .DataValueField("id")
                                            .DataTextField("Text")
                                            .Template("#:id # - #:datacolumn # - #:datecolumn #")
.DataSource(source=>{source.Read(read=>{read.Action("action","controller");});})
.Events(e=>{e.Select("onselect");})
                                            )
   </text>
   );

 

Thanks,

Anupriya. R

Anupriya
Top achievements
Rank 1
commented on 05 Sep 2025, 01:39 PM

Note: When commenting the template fileds, 

like the below

  1. optionalLabelTemplate
  2. Template 

its working fine. help me on this how to implement these with csp.

 

 

 

 

Its working fine.

No answers yet. Maybe you can help?

Tags
DropDownList PanelBar
Asked by
Anupriya
Top achievements
Rank 1
Share this question
or