Telerik Forums
Kendo UI for jQuery Forum
1 answer
20 views

You use it to bind to a viewModel:

viewModel.bind("change", function( event ){
    console.log("BIND:", event.field, "=", this.get(event.field));
});

this.get(event.field)
has the data just modified.

Is there a way to get the old data, before change?

Many thanks

Neli
Telerik team
 answered on 12 Mar 2024
1 answer
27 views
0

I have an Enum Model called TargetType and ReportViewModel. All the records from the Report table is listing in a kendo grid using the viewmodel ReportViewModel. But the problem is If I try to filter the enum type column 'EmpTypes' it will break the application and cannot filter it. How can I make it filter the column EmpType in Kendo?

 
public enum EmpTypes
{
[Display(Name="Service")
Service = 0,
[Display(Name="Sales")
Sales = 1
[Display(Name="Purchase")
Purchase = 2,
[Display(Name="Office")
Office = 3
}
public class ReportViewModel
{
public string Name {get;set;}
public EmpTypes EmpTypes {get;set;}
}

The Report Table consists the following record

{Name = "AbC",  EmpTypes = 1},
{Name = "xyz",  EmpTypes = 2},

In ReportController GetEmpTypes() , I am fetching the data into Kendo

IQueryable<Report> reportquery = dbContext.Reports;
var kendoList = reportquery.Select(r=>new ReportViewModel()
{
Name = r.Name,
EmpTypes = r.EmpTypes
});
return kendolist.ToDataSourceResultAsync(request);

In Kendo Grid

Columns(columns =>
{
    columns.Bound(c => c.Name).Title("Report Name");
    columns.Bound(c => c.EmpTypes).Title("Type")
        .Filterable(filterable => filterable
            .Multi(true))
            .DataSource(dataSource => dataSource
                .Read(read => read.Action("GetEmpTypes", "Report"))
            )
        );
})

Anton Mironov
Telerik team
 answered on 11 Mar 2024
0 answers
16 views

Given this code:

cols - API Reference - Kendo UI TextArea - Kendo UI for jQuery (telerik.com)

If I change the cols from 30 to 3 it doesn't seem to change the width of the textarea? Isn't the width of the textarea supposed to decrease?

<textarea id="description"></textarea>
<script>
    $("#description").kendoTextArea({
        rows:20,
        cols:30,
        resizable: "vertical"
    })
</script>

Is this a bug?

Thanks!

George

George
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 07 Mar 2024
2 answers
18 views

Hello,

I am currently using Kendo version 2024.1.130 with ASP.NET core Razor Pages.

In this version I am unable to get a sum aggregate to show. Nothing woks, not even a "ABC" string. The footer is visible and all columns contain a &nbsp;

Relevant Code:

@(Html.Kendo().Grid<ItemViewModel>()
    .Name("grid")
    .Filterable()
    .Sortable()
    .Scrollable()
    .Columns(columns =>
    {
        //...
        columns.Bound(c => c.ExtendedPrice).Title("Extended Price").Format("{0:n0}").ClientFooterTemplate("#=sum#");
        //...
    })
    .DataSource(dataSource => dataSource
        .Ajax()
        .Aggregates(aggregates =>
        {
            aggregates.Add(p => p.ExtendedPrice).Sum();
        })
        .Read(read => read.Action("GetList", "Bom").Type(HttpVerbs.Get).Data("getParameters"))
        .Events(e => e.Error("showSimpleModelStateErrors").RequestStart("clearErrors").RequestEnd("gridDataLoaded"))
    )

Cristian-Leonard
Top achievements
Rank 1
Iron
 answered on 07 Mar 2024
1 answer
11 views

Is there a way to expand disabled nodes in the treeview component? There was a solution (https://www.telerik.com/forums/expand-disabled-nodes) but with the current version of kendo-ui it does not work anymore.

It seems that the expand/collapse icon is now disabled as well and it does not fire any event. Is there another solution to make this work again?

Nikolay
Telerik team
 answered on 07 Mar 2024
1 answer
48 views

Hello,

We have upgraded our Kendo jQuery package. The previous version was 2019.1.220 and our latest version is 2023.3.1114. We observed that

  • Some classes were changed in the new js say buttons in the kendo grid.
  • Some CSS files are removed. (Assuming it is not compatible with the current version.

After upgrading some of our css are not getting applied. Attaching the screenshots for reference. I'm attaching my sample code.

Below are the stylesheets I'm using
<link href="{{ URL::asset('css/boostrap_v4_alpha.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ URL::asset('kendo/styles/material-main.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ URL::asset('kendo/styles/font-icons/index.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ URL::asset('kendo/styles/bootstrap-main.css') }}" rel="stylesheet" type="text/css">
Please help me if there is something I've missed while upgrading kendo.
Nikolay
Telerik team
 answered on 04 Mar 2024
2 answers
24 views

Hi all,

I built the custom JS of Window widget by command below, the window is working but the upper right corner doesn't show action icons (Pin/Minimize/Maximize/Close).

npx gulp custom -c window

From the screenshot attached, you can see there is still finger cursor when mouse over the upper right corner, if I click it, the browser console shows error below:

Uncaught TypeError: /\bk(-svg)?-i(-\w+)+\b/.exec(...) is null
    jQuery 16
    viewEmail email_template_log_list.php:124
    <anonymous> :1
kendo.custom.js:10130:16

However, there is no any problem if I simply use ./dist/js/kendo.ui.core.min.js instead of ./dist/js/kendo.custom.min.js . Is it a bug or I've missed something?

Neli
Telerik team
 answered on 02 Mar 2024
1 answer
18 views

Hello,

Can anyone help me locate references or documentation on how to customize the SVG of a linear Gauge?

Basically, I want to create a Battery Gauge. (example attached)

 

 

Neli
Telerik team
 answered on 01 Mar 2024
2 answers
25 views
Hi all,

I build my own custom JS with command "npx gulp custom -c autocomplete,dropdownlist" according to https://github.com/telerik/kendo-ui-core , and it said "The minified version of the scripts and styles of Kendo UI Core will be put in the dist/ subdirectory." , however I can't find styles in dist subdirectory

I also read https://docs.telerik.com/kendo-ui/styles-and-layout/less-themes/overview and only found Kendo CDN, but I wanna save the CSS and related files for performance.

May I know how I can find the CSS files after build my own custom?
Ming
Top achievements
Rank 1
Iron
 answered on 29 Feb 2024
0 answers
17 views

We are testing 2023.3.1114.   I checked the release notes of 2024.1 and didn't see anything.   We are using LitElement to make a custom control that creates the kendoSwitch as show below.   Not sure what is triggering the 2nd event.   Although, I think 

    initWidget() {
        const selector = '#' + this.elemId;
        const chkMsg = (typeof this.checkedMsg === 'string') ? this.checkedMsg : 'yes';
        const unchkMsg = (typeof this.uncheckedMsg === 'string') ? this.uncheckedMsg : 'no';
        const options = {
            checked: this.isChecked,
            enabled: this.isEnabled,
            messages: {
                checked: chkMsg,
                unchecked: unchkMsg,
            },
            change: (e) => {
                this.updateValue(e.checked);
            }
        };
        $(selector).kendoSwitch(options);
    }

    updateValue(newValue) {
        // fire a change event to the element
        $(this).trigger(CHANGE, [newValue]);
        this.textValue = String(newValue);
        this.requestUpdate();
    }

Peter
Top achievements
Rank 1
 asked on 27 Feb 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?