Telerik Forums
UI for ASP.NET Core Forum
1 answer
116 views

hi

how to refresh grid and TreeView Parent Page ?

The parent page includes grid and TreeView and I want the child page that is in the new tab
Update grid and TreeView.

Also, on the child page or the new tab, by clicked on the button, a kendo window will open in iframe mode, which I want to change the grid and TreeView after clickined the save button ، be updated on the main page.

Thanks

Alexander
Telerik team
 answered on 08 Mar 2023
2 answers
492 views
HI,
how can i add a file upload (image) in a kendo form?

I don't see item upload in the list (see image)

Thank you


n/a
Top achievements
Rank 1
Iron
 answered on 06 Mar 2023
0 answers
86 views

Hello
How can I content Script 

.ClientTemplate


transfer it to file or Partial, that is, to have a code similar to the following:


columns.Bound(e => e.TicketId).Title(" ").ClientTemplate("
 @await Html.PartialAsync("_MsgList_FileUpload_Select",new { MessageId = "#=MessageId#" })
")
thanks
Mohamad Javad
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 06 Mar 2023
1 answer
612 views

Good afternoon,

I've noticed an inconsistency with the styles of textboxes when editing inline in a grid for textboxes and numeric textboxes.

In the demo they appear correctly, having had the surrounding span added, and have the theme's colouring and styling:

https://demos.telerik.com/aspnet-core/grid/editing-inline?autoRun=true&theme=classic-opal

However, if you edit in Telerik REPL (and the same happens for me in my dev environment) the numeric textboxes display differently, and don't pick up the theme's styling:

I've also notice that the EditorTemplates for Boolean, Date and DateTime are not working correctly as the closing bracket appears too early and renders the text:

HtmlAttributes(new { title = Html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName("")})

I have fixed this by editing the templates.

Kind regards,

Richard

 

Stoyan
Telerik team
 answered on 01 Mar 2023
1 answer
604 views

Hi,

I have a Kendo Validator with some custom rules, including hitting an API to prevent name duplication.


            rules: {
                noDups: function (input: any) {
                    if (input[0].id == "Name") {

                        let url = $("#duplicate-link").data("url") + "?name=" + input.val();

                        $.get(url, function (response) {
                            return !response;
                        });
                    }

                    return true;
                },

Basically, if the name comes back as "already found" from the API, return false.

I have logged the output and the response is returning false when the name matches.

However, when validating the form, only the required validator is firing.  I don't see the false return value affecting the validator's red box and validation message, and the form still submits.


        $("#submit").on("click", function () {
            let validator = $("#form1").data("kendoValidator");

            if (validator.validate()) {
                console.log('validated');
            }
        });

                @(Html.Kendo().TextBoxFor(m => m.Name).HtmlAttributes(new { @class = "form-control", placeholder = "Application Name", required = true, data_noDups_msg = "This field is required" }))

Any thoughts?  Thanks!

Aleksandar
Telerik team
 answered on 27 Feb 2023
0 answers
96 views

The model I have to work with has mixed Json property names. Can´t easiely unify them as that will break filtering on the db. While the grid has a seperate model from the db entity ToDataSourceResultAsync is called after mapping the IQueryable, so cosmosdb will use the json attributes on the grid model and not the db entity to generate the query. Prior to .net core there supposedly was a method to define the field name .From.

.Model(model =>
{
   model.Field(p => p.Name).From("name");
})

The .From method no longer seems to exist. My workaround for now was to implement a custom extension method that uses reflection to set the name.

public static class KendoExtensions
{
    public static DataSourceModelFieldDescriptorBuilderBase<T, TDataSourceModelFieldDescriptorBuilder> MapFrom<T, TDataSourceModelFieldDescriptorBuilder>(
        this DataSourceModelFieldDescriptorBuilderBase<T, TDataSourceModelFieldDescriptorBuilder> builder, string name)
        where TDataSourceModelFieldDescriptorBuilder : DataSourceModelFieldDescriptorBuilderBase<T, TDataSourceModelFieldDescriptorBuilder>
    {
        var fieldInfo = builder.GetType()
            .GetField("descriptor", BindingFlags.Instance | BindingFlags.NonPublic);

        var descriptor = (ModelFieldDescriptor)fieldInfo!.GetValue(builder);

        descriptor!.From = name;
        return builder;
    }
}

Is there another way of doing this now? The above works just fine right now, but accessing protected members of 3rd party libraries is something I would very much like to avoid.

The following is the link where they said that there is supposed to be a .From method, but that does not seem to exist for me in 2023.1.117.

https://www.telerik.com/forums/json-serialization-breaks-grid

___

Only just now saw that the last reply said that this is only available when using a Custom Data Source. Guess I gotta do that instead then. Will try that tomorrow. Not sure why that would be required looks like a case of more boilerplate for no reason to me.

 

Max
Top achievements
Rank 1
 updated question on 26 Feb 2023
1 answer
650 views

Hi, 

I'm working on develop web application using MVC Core with Razor. I'm using kendo upload to upload excel file.  After I got the uploaded excel file, I want to read the data to the temp table (or grid if possible). How do I get to the Posted File InputSteam to read  or loop data to temp table? With asp.net web form, I used PostedFile.InputSteam to read data, how do I do that with kendo upload control?

Thank you for your help.

 

Mihaela
Telerik team
 answered on 24 Feb 2023
1 answer
319 views

Hello,

I want the grid to be refreshed column wise as the DataTable datasource changes. Calling the client side read function refreshes the data source but does not refresh the columns based on the data source changing. We have filters that will remove/add columns since the DataTable is dynamic. I am populting the grid like below:

ASP.NET Core Dynamic Grid in ASP.NET Core - Telerik UI for ASP.NET Core

Thank you.

Alexander
Telerik team
 answered on 23 Feb 2023
1 answer
1.2K+ views

A new demo application called e-shop was released concomitant with the release of Telerik UI for ASP.NET Core 2023.1.117.    Normally source code for demo programs can be installed as an option in the Control Panel.  However, in this case,  it appears, after some searching that the course code  was not installed in the C:\Program Files (x86)\Progress\Telerik UI for ASP.NET Core R1 2023\wrappers\aspnetcore\Examples folder.   Runnning the Demo Shortcut and clicking on the sample e-shop Applcation simply takes you to https://demos.telerik.com/aspnet-core/eshop/

Can anyone point me to a download link for the source files for the e-shop sample application?

Mihaela
Telerik team
 answered on 21 Feb 2023
1 answer
188 views

After converting my project from .NET 4.7.2 to .NET 6.0 I am facing below JS error for Kendo UI multiselect

readyException.js:9 Uncaught TypeError: Cannot read properties of undefined (reading 'off')
    at init._editable (kendo.multiselect.js:537:40)
    at init.readonly (kendo.list.js:201:18)
    at new init (kendo.ts:796:30)
    at HTMLSelectElement.eval (kendo.core.js:3469:32)
    at Function.each (core.js:260:19)
    at jQuery.fn.init.each (core.js:82:17)
    at $.fn.<computed> [as kendoMultiSelect] (kendo.core.js:3468:26)
    at HTMLDocument.<anonymous> (List:668:63)
    at mightThrow (deferred.js:124:29)
    at process (deferred.js:192:12)

Aleksandar
Telerik team
 answered on 20 Feb 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?