Telerik Forums
UI for ASP.NET MVC Forum
1 answer
175 views

Hi,

I am working on making application CSP complaint using  UI for ASP.NET MVC R1 2023 SP2 (version 2023.1.425).

Grid column is having ClientTemplate which is causing grid to be empty. This was working prior.

Below is the code snippet:

.ClientTemplate("<a target='_blank' href=" + @Url.Action("ReportRouter", "Reports") + "?reportId=#=ReportId#>#=DisplayName#</a>");

 

Developer tool is showing Invalid template error. I have also added 

@(Html.Kendo().DeferredScriptFile())

 

Any input is appreciated.

 


Anton Mironov
Telerik team
 answered on 02 Jun 2023
1 answer
116 views
Using the 2023.1.425 build of the UI for ASP.NET MVC suite the Notification component is no longer centering as it used to.  Even the demo page for the component on which our code is patterned to do the centering is not working - the notification still shows in the lower right corner when clicking the "Show Centered Notification" button.  Is this a bug that can be fixed or does the example code need to be updated?
Michael
Top achievements
Rank 2
Iron
Iron
Iron
 updated answer on 01 Jun 2023
0 answers
91 views
Hello, I currently have a grid and a child grid. In my child grid I have a custom pop up editor and Inside this editor I would like to Have a grid with only read actions but I keep running into errors such as type errors and "dictionary contains a null entry for parameter ID". Is there a specific way to implement this?
Ibrahim
Top achievements
Rank 1
 asked on 31 May 2023
0 answers
79 views

RadEditor is closing the source element that is nested inside the video element . For example, in the attached screen shots show the “source” element which we add it to Rich text field. After we save the Rich Text field and open it again, we see the source element is closed. Is there a configuration setting that would allow us to bypass the closure of the source element?

 

 

Mike
Top achievements
Rank 1
 asked on 25 May 2023
0 answers
155 views
I am using Visual Studio 2022 and have telerik trial downloaded. I want to use datepicker control. Where are the dlls located so i can use the control?
Charles
Top achievements
Rank 1
 asked on 25 May 2023
1 answer
90 views

Hello,

I need to apply the default template to all cells without template in all grids throughout the existing application, for example:

<span class="some-css-class">FieldValue</span>

Is there a way to achieve this?

Thanks,

Dennis

Eyup
Telerik team
 answered on 24 May 2023
1 answer
307 views

we are working to fix the issue with Kendo-CSP for ASP.Net MVC with jQuery Kendo UI. In our application currently, we are using Kendo grids, dropdowns, and popups.

Initially, we have implemented the below changes for CSP.

  • Update to jQuery 3.6.4
  • Generated the Dynamic nonce numbers and applied nonce for inline scripts
  • Ajax calls replaces with Jquery get/post methods.
  • Removed all styles and replaced them with bootstrap classes.
  • Onclik and Onchanges events replace with javascript addevent listeners.
  • added the Unsafe prefix in the configuration (waiting for the Kendo 2023 R1 version)

Recently we got a new version of Telerik R1 2023, Replaced the below files for Upgrade.

  • Kendo.mvc.dll
  • kendo.aspnetmvc.js
  • kendo.all.min.js

we tried with new changes of kendo, without Unsafe prefix but it's throwing dynamic script errors, kendo controles not working. Our assumption is there are dynamic inline script Generations for Kendo controls which not contains nonce which may cause an issue.

We also tried with Deferred-Script but no use.

we are facing console issues related to Style and Scripts. Help me out.

Thanks.

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 23 May 2023
12 answers
519 views
I am using Kendo UI ASP.NET MVC Grid (Razor) in Ajax mode with a popup editor.

As an example say: Customers have orders.

User of the application go to a grid that displays all customers. User is allowed to add/edit/delete customers (and their orders).
But when the user clicks on edit and the popup editor comes up that is when I want to load orders. I do not want to load orders eagerly since a customer may have many orders and the user may never edit any customer at all.

Seems like this should be a simple thing to do. I have looked through all forums/questions. I have not been able to find such an example. Can someone help me with this?

Thanks a bunch!
Stacey
Telerik team
 answered on 23 May 2023
2 answers
105 views

Here is the code to show the list, it also has a part to show detail information by expanding the record, it shows the details first time you expand the record for some seconds and then clear them , and if you expand it again this time you can see details!
wonder if something triggered to clear the details or what, as it has the details so I don't think it would be matter of reading data!
@(Html.Kendo().Grid(Model)
    .Name("LSGrid")
    .AutoBind(false)
    .NoRecords(x => x.Template("<div class=\"k-grid-norecords-template\">No records found that match your search criteria </div>"))
    .Columns(columns =>
    {
        columns.Bound(p => p.Name).Title("Rail Infrastructure Manager").HeaderHtmlAttributes(new { style = "font-weight: bold" });       
        columns.Bound(p => p.Ref).Title("Line section ID").HeaderHtmlAttributes(new { style = "font-weight: bold" });

    })
        .Events(e => e.DetailExpand("detailExpand"))
        .ClientDetailTemplateId("template")
    .Pageable( pageable => pageable.ButtonCount(10))
    .Sortable()
    .Scrollable(scr=>scr.Height(300))
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)       
        .ServerOperation(true)
        )
)

<script id="template" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<Dto>()
            .Name("grid_#=Id#") // template expression, to be evaluated in the master context
            .Columns(columns =>
            {
                    columns.Bound(o => o.Id).Title("State/Territory").Width(110);
                columns.Bound(o => o.StartKm).Title("Start Km Point").Width(110);
                columns.Bound(o => o.EndKm).Title("End Km Point").Width(110);
            })            
            .Pageable()
            .ToClientTemplate()
    )
</script>

detailExpand: function (e) {
        var dataItem = e.sender.dataItem(e.masterRow);
       e.detailRow.find(".k-grid").data("kendoGrid").dataSource.data(dataItem.Jurisdictions);
    },

Version of Kendo.MvC.dll as reference of project is 2021.2.616
Thanks       
Eyup
Telerik team
 answered on 23 May 2023
1 answer
130 views

Can someone please help with the MVC wrapper syntax to accomplish this: https://docs.telerik.com/kendo-ui/knowledge-base/use-different-popup-editor-for-create-update

I would like to specify different template names for new and edit with two different cshtml editor template files

 

Anton Mironov
Telerik team
 answered on 23 May 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?