Telerik Forums
Kendo UI for jQuery Forum
1 answer
66 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
1 answer
21 views

greetings,

I am currently migrating from kendo version 2015.2.902 to 2023.1.314 for some of the company's core applications and I have the following problem.

When adding the create command to any grid, adding a new row is not working, if I disable the following code in the ondatabound event

function onGridDataBound() {
    /*$('.k-grid-add').unbind("click");*/

    $('.k-grid-add').bind("click", function () {
        if (esModuloAtributos() && configuradorUtils.mode === "edit") {
            setKendoDropDownInitSelection("xxxx");
            setKendoDropDownInitSelection("xxxxx");
        } else if (esModuloAgrupaciones() && configuradorUtils.mode === "edit") {
            setKendoDropDownInitSelection("xxxx");
            setKendoDropDownInitSelection("xxxxxx");
        }
        $("#Todos").prop("checked", false);
        return validaFiltros();
    }); 
}

The grid works to create and add the new row, but it does not maintain the functionality that if x condition is met it should add the row.

Nikolay
Telerik team
 answered on 27 Feb 2024
1 answer
30 views

Hi there,

Currently I try to export data from a grid with details, however when I trigger the event export the UI generate the next error.

Code: In this object we have the data.

The code run until at the end and after this is the message.

I am using the documentation and examples, but dont works too.

https://docs.telerik.com/kendo-ui/knowledge-base/detail-grid-export

Another thing I reviewed that work with angular.

Thank you for your help !

 

 

 

Peter Milchev
Telerik team
 answered on 27 Feb 2024
0 answers
41 views

AngularJS version 1.5.8.
Kendo UI version 2016.3.914+Official

I have a kendo grid with the resizeable property set to true. However, when I display the grid and then use my cursor to resize the grid, it appears the grid rebinds the data and reverts all columns to their original size.

How do I make resized widths stay set?
Are there any properties I should look at to help with this issue?

Clint
Top achievements
Rank 1
Iron
Iron
Iron
 updated question on 22 Feb 2024
1 answer
15 views
I want to costomised validation, but right now it is showing incorrect validation , I am providing the screen sort and working code. pls provide the correct code so I can costomised the validation.

our working code is:
  $("#EnterpriseNote-grid").kendoGrid({
                                            dataSource: {
                                                type: "json",
                                                transport: {
                                                    read: {
                                                        url: "@Html.Raw(Url.Action("ListEnterpriseNoteData", "Enterprise", new { Id = ViewBag.EnterpriseID }))",
                                                        type: "POST",
                                                        dataType: "json",
                                                        //     data: additionalData
                                                    }, create: {

                                                        url: "@Html.Raw(Url.Action("AddEntrpriseNoteData", "Enterprise", new { newdata = "", Id = ViewBag.EnterpriseID }))",
                                                        type: "GET",
                                                        dataType: "json",
                                                        //  data: addAntiForgeryToken
                                                    },update: {
                                                        url: "@Html.Raw(Url.Action("EditEnterpriseNote", "Enterprise"))",
                                                        type: "POST",
                                                        dataType: "json",
                                                        //   data: addAntiForgeryToken
                                                    },
                                                    destroy: {
                                                        url: "@Html.Raw(Url.Action("DeleteEnterpriseNote", "Enterprise"))",
                                                        type: "POST",
                                                        dataType: "json",
                                                        //   data: addAntiForgeryToken
                                                    },
                                                },
                                                schema: {
                                                    data: "Data",
                                                    total: "Total",
                                                    errors: "Errors",
                                                    model: {
                                                        id: "Id",
                                                        fields: {
                                                            strNoteText: {
                                                                editable: true, type: "string",

                                                                validation: {
                                                                    required: {
                                                                        message: 'Note Text is required'
                                                                    },
                                                                }
                                                            },
                                                            strNextReminderDate : { editable: true, type: "date" },
                                                            strFirstname: { editable: false, type: "string" },
                                                            strAssignedTo: {
                                                                editable: true, type: "string",
                                                                validation: {
                                                                    required: {
                                                                        message: 'PhoneNumber is required'
                                                                    },
                                                                    Assignedvalidation: function (input) {
                                                                        var trimmedValue = input.val().trim();
                                                                        debugger
                                                                        if (input.val() == "") {
                                                                            var acv = $(".k-tooltip-validation[data-for='strAssignedTo']");
                                                                            acv.text("PhoneNumber is required");

                                                                        }
                                                                        return true;
                                                                    },
                                                                }, },
                                                            bitClosedYN: { type: "boolean", editable: true, }
                                                        }
                                                    },
                                                    sort: [{ field: "id", dir: "desc" }]
                                                },
                                                requestEnd: function (e) {
                                                    if (e.type == "create" || e.type == "update") {
                                                        this.read();
                                                    }
                                                },
                                                error: function (e) {
                                                    //display_kendoui_grid_error(e);
                                                    // Cancel the changes

                                                    $('#divError').html('<div class="alert alert-danger alert-dismissable">'
                                                        + '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>Note cannot be deleted because it is being used.'
                                                        + '</div>');
                                                    this.cancelChanges();
                                                },
                                                pageSize: 4,
                                                serverPaging: true,
                                                serverFiltering: true,
                                                serverSorting: true
                                            },
                                            pageable: {
                                                refresh: true,
                                                pageSizes: [10, 15, 20, 50, 100]

                                            },
                                           toolbar: [{ name: "create", text: "Add New" }],
                                            editable: {
                                                confirmation: "Are you sure you want to delete this item?",
                                                mode: "inline",
                                                //mode: "incell"
                                            },
                                            scrollable: false,                                           
                                             ///////////////////////////code by puja verma//////////////////////
                                            dataBound: function (e) {
                                                
                                                var dataItems = this.dataSource.view();
                                                var isFieldPending = false;
                                                var validationErrors = [];
                                                for (var i = 0; i < dataItems.length; i++) {
                                                    if (dataItems[i].strNoteText === "") {
                                                        isFieldPending = true;
                                                        validationErrors.push("Please Save the new record before clicking Next");
                                                        break;

                                                    }
                                                }
                                               
                                                @*////////////////////code by puja verma///////////////////*@
                                                var nextButton = $("#nexttocomplete");
                                                var validationMessage = $("#validationMessageEnterprisenotes1,#validationMessageEnterprisenotes");
                                                if (isFieldPending || validationErrors.length > 0) {
                                                    nextButton.prop("disabled", true);
                                                    validationMessage.text(validationErrors.join('\n'));

                                                }
                                                
                                                else {
                                                    nextButton.prop("disabled", false);
                                                    validationMessage.text("");
                                                }
                                            },
                                              ///////////////////////////code by puja verma//////////////////////
                                            // dataBound: onDataBound,
                                            columns: [

                                                {
                                                    title: "Action",
                                                    command: [
                                                        {
                                                            name: "edit",
                                                            text: {
                                                                edit: '<i style="color:#B60202;" class="fa fa-edit fa-lg"></i>',
                                                                update: '<i style="color:#B60202;" class="fa fa-floppy-o" aria- hidden="true"></i>',
                                                                cancel: '<i style="color:#B60202;" class="fa fa-close fa-lg"></i>'
                                                            }
                                                        },

                                                        {
                                                            name: "destroy",
                                                            text: '<i style="color:#B60202;" class="fa fa-trash fa-lg"></i>'
                                                        }
                                                    ],
                                                    width: 130
                                                },

                                                {
                                                    field: "strNoteText",
                                                    title: "Enterprise Note",
                                                    width: 300
                                                },
                                                {
                                                    field: "strAssignedTo",
                                                    title: "Assigned to",
                                                    width: 300,
                                                    template: '#=strFirstname#',
                                                    editor: function (container, options) {
                                                        $('<input required name="' + options.field + '"/>')
                                                            .appendTo(container)
                                                            .kendoDropDownList({
                                                                dataSource: noteList,
                                                                dataTextField: "strFirstname",
                                                                dataValueField: "strAssignedTo",
                                                                valuePrimitive: true,
                                                                autoBind: false,
                                                                optionLabel: "Select site admin",
                                                                height: 500
                                                            })
                                                    },
                                                },
                                                {
                                                    field: "strNextReminderDate",
                                                    title: "Reminder Date",
                                                    format: "{0:dd/MM/yyyy}",
                                                    width: 300
                                                },
                                                {
                                                    field: "bitClosedYN",
                                                    title: "Status",
                                                    width: 100,
                                                    //template: "<input type='checkbox' name='bitClosedYN' checked='checked' disabled='disabled' />",
                                                    template: "#= (bitClosedYN == true ) ? 'Yes' : 'No' #",
                                                    attributes: { class: "ob-fld-boolean" },
                                                }

                                                    ]
                                                });
Neli
Telerik team
 answered on 21 Feb 2024
1 answer
30 views

the font was increased the way 

 


/*kendo-pdf-document .k-grid th {
    font-size: 25px;
    word-wrap: break-word;            
}*/

 

but if the header does not fit, it is cut, word-wrap does not work, how to make header wrap?

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
 answered on 19 Feb 2024
1 answer
38 views

Hello Team,


We are currently facing challenges with the Kendo grid, which is a widely used widget or component at o9Solutions. Although we have been using Kendo for a long time, the widget is failing to meet accessibility standards for some components, which are crucial in today's world.


Regarding the Kendo grid, there is an issue where SR is reading the table twice, once for the header and once for the cells. This can cause confusion for assistive technologies like SR.

Consider the cases of horizontal scroll or fixed column cases also.

Having a single <table> is the standard. We can't create multiple tables, which will violate the good coding practices + accessibility standards.

---

I saw some posts regarding this... where it was mentioned we can remove this Scrollable() . But what are the cons of this if we remove this?
--

 

We want this functionality like a horizontal or vertical scroll or fixed column cases.But it needs to recognize as a single table.


Case: Frozen [Name and hometown ..enabled locked flag]. It's considered as 4 table.

https://dojo.telerik.com/oXoroDav

 

Case 2: normal one. It's considered as  2 table.

Dojo: https://dojo.telerik.com/@naseer743/eyeVuCep

 

Peter Milchev
Telerik team
 answered on 16 Feb 2024
3 answers
53 views

Hi.

I have a problem with the pagination grid when inside a tabstrip. and I don't know why this happens and how to solve it.

<div class="h-100">
        <div id="tabstrip" class="h-100">
            <ul>
                <li class="k-active">Arbeitsschritte</li>
                <li>Mitteilungen</li>
                <li>Wiedervorl</li>
            </ul>
            <div id="tab1" class="vh-100">
                <div id="grid1"></div>
            </div>
            <div class="vh-100">
                <div id="grid2"></div>
            </div>
            <div class="vh-100">
                <div id="grid3"></div>
            </div>
        </div>
    </div>

<script>
    $(document).ready(function () {
        $("#tabstrip").kendoTabStrip();

        $("#grid1").kendoGrid({
            dataSource: {
                type: "odata",
                transport: {
                    read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
                },
                pageSize: 20
            },
            height: '100%',
            groupable: true,
            sortable: true,
            columnMenu: true,
            resizable: true,
            reorderable: true,
            pageable: {
                refresh: true,
                pageSizes: true,
                buttonCount: 5
            },
            columns: [{
                field: "ContactName",
                title: "Contact Name",
                width: 240
            }, {
                field: "ContactTitle",
                title: "Contact Title"
            }, {
                field: "CompanyName",
                title: "Company Name"
            }, {
                field: "Country",
                width: 150
            }]
        });

        $("#grid2").kendoGrid({
            dataSource: {
                type: "odata",
                transport: {
                    read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
                },
                pageSize: 20
            },
            height: '100%',
            groupable: true,
            sortable: true,
            columnMenu: true,
            resizable: true,
            reorderable: true,
            pageable: {
                refresh: true,
                pageSizes: true,
                buttonCount: 5
            },
            columns: [{
                field: "ContactName",
                title: "Contact Name",
                width: 240
            }, {
                field: "ContactTitle",
                title: "Contact Title"
            }, {
                field: "CompanyName",
                title: "Company Name"
            }, {
                field: "Country",
                width: 150
            }]
        });

        $("#grid3").kendoGrid({
            dataSource: {
                type: "odata",
                transport: {
                    read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
                },
                pageSize: 20
            },
            height: '100%',
            groupable: true,
            sortable: true,
            columnMenu: true,
            resizable: true,
            reorderable: true,
            pageable: {
                refresh: true,
                pageSizes: true,
                buttonCount: 5
            },
            columns: [{
                field: "ContactName",
                title: "Contact Name",
                width: 240
            }, {
                field: "ContactTitle",
                title: "Contact Title"
            }, {
                field: "CompanyName",
                title: "Company Name"
            }, {
                field: "Country",
                width: 150
            }]
        });

    })
</script>

Martin
Telerik team
 answered on 16 Feb 2024
1 answer
26 views

I have a kendoGrid, on initial load I am able to see the pagination being set and datasource.total has some value:

On Initial load:

When I click on the default "cancel" option from my toolbar, the total is "undefined".:
OnCancel:

 

I can see the data in my grid, but the pagination footer displays "No items to display"

Martin
Telerik team
 answered on 08 Feb 2024
1 answer
48 views
My header widths do not match with my data content in the Kendo Grid. I have a fixed width for the container, and after hiding 4 out of 7 columns, the header displays with the intended width. However, the alignment of the data in those columns does not match. I have locked the first column, so I have two tables, one for the locked column and one for the unlocked. Whenever I group or filter records, the locked column width does not match with unlocked columns. Also, the same issue exists for the height.
Martin
Telerik team
 answered on 05 Feb 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?