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

Hi, I have a Grid for which I have an EditorTemplate. Everything works fine in development, but it fails in production, it seems like the editortemplate is ignored. In Index.cshtml:

.Editable(editable => { editable.Mode(GridEditMode.PopUp).TemplateName("PatentTmpl"); })
This is just enough to make it work in development environment, but when I publish the project it doesn't work, no matter what I've tried. 

The template is located both in Patents/EditorTemplates and Shared/EditorTemplates. 

Did anyone have a problem like this before, or any ideas what to try? It just doesn't make any sense that it's not working in production.

Thanks in advance.

Tsvetomir
Telerik team
 answered on 26 Jan 2022
1 answer
102 views

I have two multiselects (vendors and buyers) that are required selections to load a grid which lists POs when a user presses a "search" button. I am trying to learn about how to add validation so that you cannot load the grid unless the two multiselects have something selected. The documentation that I've found deals with forms so trying to figure out how to implement validation for my usecase. 

                    <label for="vendorslist" style="color:white; line-height:3.2; padding-right:3px; padding-top:5px">Vendors</label>
                    <div class="nav-item dropdown" style="padding-right:10px;">
                        @(Html.Kendo().MultiSelect()
                        .Name("vendorslist")
                        .Filter(FilterType.Contains)
                        .Placeholder("Select Vendor...")
                        .AutoClose(false)
                        .AutoBind(false)
                        .DataTextField("displayvalue")
                        .DataValueField("keyvalue")
                        .AutoWidth(true)
                        .HtmlAttributes(new { style = " font-size:inherit; width:250px" })
                        .DataSource(source =>
                        {
                            source.Read(read =>
                            {
                                read.Action("GetVendorList", "UVL").Data("GetFacilityCode");
                            }).ServerFiltering(false);
                        })
                        .Events(events => events.Open("vendorsListOpen"))
                        )
                    </div>

                    <label for="buyerslist" style="color:white; line-height:3.2; padding-right:3px; padding-top:5px">Buyers</label>
                    <div class="nav-item dropdown" style="padding-right:10px;">
                        @(Html.Kendo().MultiSelect()
                        .Name("buyerslist")
                        .AutoClose(false)
                        .AutoBind(false)
                        .Placeholder("Select Buyer...")
                        .Filter(FilterType.Contains)
                        .DataTextField("agent")
                        .AutoWidth(true)
                        .HtmlAttributes(new { style = " font-size:inherit; width:150px" })
                        .DataSource(source =>
                        {
                            source.Read(read =>
                            {
                                read.Action("GetBuyers", "PODashboard").Data("GetFacilityCode").Type(HttpVerbs.Get);
                            }).ServerFiltering(false);
                        })
                        )
                    </div>

 

Function ran when reading grid that pulls selections to use for params when calling API:

function getPOParams() {
    //grab facility
    var dataText = $("#Facility").data("kendoDropDownList").text();
    var facility = dataText.split('-');
    var _facilityCode = $.trim(facility[0]);
    var _facilityDesc = $.trim(facility[1]);

    //grab vendor
    var multiselect = $("#vendorslist").data("kendoMultiSelect");
    var _vendors = [];
    var items = multiselect.value();
    for (var i = 0; i < items.length; i++) {
        _vendors.push(items[i].trim());
    }

    //grab buyer
    var buyerMultiselect = $("#buyerslist").data("kendoMultiSelect");
    var _buyers = [];
    var buyerItems = buyerMultiselect.value();
    for (var i = 0; i < buyerItems.length; i++) {
        _buyers.push(buyerItems[i].agent.trim());
    }

    //grab PO#
    var _poText = $("#poNumTextbox").data("kendoMaskedTextBox").value().toString();

    //grab status
    var _statusText = $("#StatusDropDownList").data("kendoDropDownList").value();

    return {
        vendorCode: _vendors,
        buyer: _buyers,
        facilityCode: _facilityCode,
        facilityDesc: _facilityDesc,
        statusText: _statusText,
        poNumText: _poText
    };
}

 

Mihaela
Telerik team
 answered on 24 Jan 2022
0 answers
83 views
If a user types (keyboard input) a value into the time picker (e.g. 14:10:13) and then clicks away from the field the value resets to 00:00:00.

This behaviour is only observed on a form that has pulled in data (e.g. an Edit Page) with 'DateInput()' applied to the Time Picker.

If the form is empty (e.g. a Create Page) the user can type in a value without having it reset when clicking away from the field.

Can you advise how to fix this?

See Code below:

<div class="k-form-field"> @(Html.Kendo().TimePickerFor(model => model.Time)

.DateInput() .Format("HH:mm:ss") .Interval(15) .ToClientTemplate() ) </div>

Dru
Top achievements
Rank 1
 asked on 24 Jan 2022
2 answers
662 views
How can I customize the export file name?

Something like showing a dialog which I could enter the file name after clicking the toolbar.
CHIHPEI
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 24 Jan 2022
1 answer
3.3K+ views

Hello,

Is there a Telerik UI for ASP.NET Core extension for Visual Studio 2022 ? The existing one can be only installed on Visual Studio 2017 or 2019.

Stephane
Top achievements
Rank 1
Iron
 updated answer on 23 Jan 2022
1 answer
956 views

Hi everyone,

I'm using the ASP.NET Core MVC Grid,

after I export the pdf file it cant show chinese character properly(as the provided picture),

export pdf

I'm aware of the langauge render on the html and pdf is in a different logic,

So how and where can I add a specific font in ASP.NET Core MVC Grid?

Can anyone provide an simple example?

Tsvetomir
Telerik team
 answered on 21 Jan 2022
2 answers
336 views
I am attempting to set 

"Html.ViewData.TemplateInfo.HtmlFieldPrefix"

on a partial view to bind elements of a collection back to a view model.

If I set the prefix as well as overriding the id property in the dropdownlist html
the name property seems to have an extra prefix attached

 

See the Demo where the first dropdown has the id set and produces an invalid name.

The second dropdown does not have the id set and the name produced is correct.

Demo

This does not seem to occur when setting the id, prefix, and using the html helpers.

 

jovaughn
Top achievements
Rank 1
Iron
 answered on 20 Jan 2022
1 answer
100 views

When adding a data source to a TreeList using the HTML helper method Html.Kendo().TreeList<...>().DataSource(....) there is no possibility to define the data type that should be used. The data source accepts the JSON data generated by my API, but any updates are submitted using form data, The same problem appears when defining a standalone data source using the helper method Html.Kendo().DataSource<...>().TreeList(....). It is possible to change the TreeList(...) configuration to a Custom(...) configuration, however it is not possible to define the parent identifier of the model in this case.

Html.Kendo().DataSource<MyViewModel>()
        .Name("datasource")
        .TreeList(source =>
        {
            source.Batch(true);
            source.ServerOperation(false);
            source.Model(model =>
            {
                model.Id(x => x.Id);
                model.ParentId(x => x.Parent);
                model.Expanded(x => x.Expanded);
            });
            source.Read("Read", "Api");
            // No way to use JSON here
            source.Create(ajax => ajax.Action("Write", "Api").Type(HttpVerbs.Post));
            source.Update(ajax => ajax.Action("Write", "Api").Type(HttpVerbs.Put));
            source.Destroy(ajax => ajax.Action("Write", "Api").Type(HttpVerbs.Delete));
        })

Aleksandar
Telerik team
 answered on 19 Jan 2022
1 answer
100 views
Hello, if I purchase the DevCraft Ultimate bundle for $2199, then after my first year opt to NOT renew the M&S for $1,099... I understand my product will still work and I can continue to develop the my products with the license I originally purchased, I just won't be able to receive updates and support... however, if on year 3 I decide to renew, can I just get back in to M&S for just $1,099 to continue receiving updates and support? or will I have to re-purchase the whole bundle again?
Karina
Telerik team
 answered on 18 Jan 2022
1 answer
198 views

available Editor with model @model:


@model service.Models.ServiceViewModel
@(Html.Kendo().Editor()
            .Name("Description")
            .Tools(tools => tools
                .Clear()
                .Bold().Italic().Underline()
                .JustifyLeft().JustifyCenter().JustifyRight()
                .InsertUnorderedList().InsertOrderedList()
            )
            .StyleSheets(css => css
                .Add(Url.Content("~/shared/web/editor/editorStyles.css"))
            )
            .Value(@<text></text>)
            .HtmlAttributes(new { style = "width: 100%;height:400px" })
        )


public class ServiceViewModel
    {
********
        public string Description { set; get; }
*****
}

I save the data to the database.
When I pull the data to correct, the data is shown without markup.
At the same time, the data is saved as:

"&lt;p&gt;1&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;3&lt;/em&gt;&lt;/p&gt;"

Stoyan
Telerik team
 answered on 17 Jan 2022
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?