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

Spurious issue after upgrade to Kendo MVC 2021.1.119

5 Answers 140 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Michael asked on 01 Feb 2021, 08:20 PM

After I ran through the upgrader within Visual Studio 2019 to reference 2021.1.119 components I am all of a sudden seeing spurious <script> blocks rendered as inline html on certain (but not all) components and not on all views where various Kendo MVC components are referenced:

 

kendo.syncReady(function(){jQuery("#FiscalYearDropDown").kendoDropDownList({"change":onFiscalYearChange,"dataSource":{"transport":{"read":{"url":"/AssignedInvoices/GetFiscalYears"},"prefix":""},"schema":{"errors":"Errors"}},"dataTextField":"FiscalYear","dataValueField":"Fis

5 Answers, 1 is accepted

Sort by
0
Misho
Telerik team
answered on 03 Feb 2021, 01:15 PM

Hi,

I've tried to replicate the issue you are experiencing <script> blocks rendered as inline html on Telerik MVC components but no avail.

Could you please send us a simplified sample fully runnable project containing the minimum setup required so the issue could be observed and specify the reproduction steps so we could be able to replicate and debug it on our side, investigate it and do our best to provide you with reliable solution?

Best Regards,
Misho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Michael
Top achievements
Rank 2
Iron
Iron
Iron
answered on 03 Feb 2021, 06:23 PM

I probably should have annotated that is only appears to happen with controls embedded in a KendoGrid Toolbar Template - as an example:

.ToolBar(t => {
                                t.Template(@<text>
                                    <span class="card-text mr-1">Fiscal Year:</span>
                                    @(Html.Kendo().DropDownList()
                                        .Name("FiscalYearDropDown")
                                        .DataTextField("FiscalYear")
                                        .DataValueField("FiscalYear")
                                        .HtmlAttributes(new { style = "width: 200px" })
                                        .DataSource(source =>
                                        {
                                            source.Read(read =>
                                            {
                                                read.Action(MVC.AssignedInvoices.ActionNames.GetFiscalYears, MVC.AssignedInvoices.Name);
                                            })
                                            .ServerFiltering(false);
                                        })
                                        .Events(e => e.Change("onFiscalYearChange"))
                                        .Value((string)ViewBag.CurrentFiscalYear)
                                    )
                                </text>);
                            })

0
Misho
Telerik team
answered on 05 Feb 2021, 11:45 AM

Hello,

Since the late Kendo UI R1 2021 release, the Grid Toolbar uses new styles to be aligned with Kendo UI Toolbar which affects the described behavior.

In the such case, the Kendo UI components needs to be wrapped in an element with class .toolbar:

This has been demonstrated in the following demo:

https://demos.telerik.com/aspnet-mvc/grid/toolbar-template 

Please don't hesitate to contact us again if a specific issue pops up or in case you have other feedback or questions related to Telerik  components.

 

Best Regards,


Misho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Michael
Top achievements
Rank 2
Iron
Iron
Iron
answered on 05 Feb 2021, 12:48 PM

Misho,

That does indeed resolve the issue - much appreciated.

 

Regards,

 

Michael Jensen

0
Misho
Telerik team
answered on 09 Feb 2021, 05:54 AM

Hi,

I'm glad that you managed to resolve the issue. 

Please don't hesitate to contact us again if a specific issue pops up or in case you have other feedback or questions related to Telerik  components.

Best Regards,
Misho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Misho
Telerik team
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or