Telerik Forums
Kendo UI for jQuery Forum
1 answer
6 views

I've seen your demos on setting up the type: "date" and the format: stuff on the model and on the column display for the grid.  Your demo sorts the dates as if they are dates properly.  Ours shows the value as null if we set the type to date.  It displays the string properly if we set it to type string but still sorts as a string.  If we simply set the column to the kendo format and do not use a schema on the datasource, our code still sorts as a string.

https://dojo.telerik.com/TgCibbiL

When I looked at the data in your demo, it looks like the long form GMT.  Today, we are instead blocking the script from sending the .NET property types of DateTime and instead sending a pre-formatted string of the date.  Ran into some serialization issues when posting those same objects with DateTime properties on them.

Are you returning your DateTime properties as strings but formatted in this GMT when you serialize your .NET data objects back to the JavaScript handlers?

Martin
Telerik team
 answered on 22 May 2025
1 answer
41 views

Module Bundlers - Kendo UI Third-Party Tools - Kendo UI for jQuery

The module bundlers page references Vite as an example which leads me to believe that it can be used with Kendo.

However even this basic example doesn't appear to work: https://stackblitz.com/edit/vitejs-vite-i842ucun?file=src%2Fmain.js

Am I doing something wrong?

Hui Chuan
Top achievements
Rank 1
Iron
 answered on 21 May 2025
1 answer
8 views
I've got a grid that uses a Kendo Wizard in the grid edit popup window.  The first step in the wizard has 3 AutoComplete controls (among other controls).  The first 2 AutoCompletes do not save the value selected back to the model and grid, but the 3rd one does and they're all configured exactly the same.  The code was working before we upgraded to 2024.3.806.  Are there breaking changes for the wizard or AutoComplete in this release?  A demo for this kind of scenario would be helpful because I inherited this code, and I'm not even sure if it was done correctly.  Here is a sample of the js that defines the grid and the wizard (in the grid edit method):

    $gridDiv.kendoGrid({
        autoBind: true,
        columns: [
            {
                field: "DealNumber",
                title: "Deal Number",
                filterable: {
                    extra: false,
                    operators: {
                        string: { contains: "contains" }
                    }
                },
                sortable: true,
                template: 'dealUrl',
                editable: () => false
            },
            {
                field: "CustomerName",
                title: Customer Name",
                filterable: {
                    extra: false,
                    operators: {
                        string: { contains: "contains" }
                    }
                },
                sortable: true
            },
            {
                field: "SalesPersonName",
                title: "Sales Person",
                filterable: {
                    extra: false,
                    operators: {
                        string: { contains: "contains" }
                    }
                },
                sortable: true
            },
            {
                field: "CreatedDate",
                type: "date",
                title: "Created Date",
                sortable: true,
                filterable: true,
                format: "{0: M/d/yyyy}",
                width: 100,
                editable: function () { return false; }
            }
        ],
        editable: {
            mode: "popup",
            window: {
                title: "Add/Edit",
                width: "500px"
            }
        },
        edit: function (e) {
            const popupWindow = e.container.data("kendoWindow");
            popupWindow.center();

            let model = e.model;

            $(e.container).kendoWizard({
                pager: true,
                done: function (e) {
                    e.preventDefault();

                    $gridDiv.dataSource.sync();

                    $($(".k-popup-edit-form")[0]).data("kendoWindow").close();
                },
                reset: function (e) {
                    e.preventDefault();

                    $gridDiv.cancelChanges();

                    $($(".k-popup-edit-form")[0]).data("kendoWindow").close();
                },
                steps: [
                    {
                        title: "Sale Info",
                        buttons: [{
                            name: "next",
                            primary: true,
                        },
                        {
                            name: "reset",
                            text: "Cancel"
                        }],
                        form: {
                            id: "page1",
                            orientation: "vertical",
                            formData: model,
                            items: [

                                {
                                    field: "CustomerName",
                                    title: "Customer Name",
                                    editor: "AutoComplete",
                                    editorOptions: {
                                        dataSource: {
                                            serverFiltering: true,
                                            transport: {
                                                read: {
                                                    url: "/Customer/Search",
                                                    dataType: "json",
                                                    type: "POST"
                                                },
                                                parameterMap: (options, operation) => {
                                                    return {
                                                        text: (options.filter.filters[0] !== void 0) ?
                                                            options.filter.filters[0].value :
                                                            null
                                                    };
                                                }
                                            }
                                        },
                                        dataTextField: "FullName",
                                        minLength: 3,
                                        highlightFirst: true,
                                        suggest: true,
                                        valuePrimitive: true,
                                        select: (e) => {
                                            model.set("CustomerId", e.dataItem.Id);
                                        },
                                        enforceMinLength: true,
                                        filter: 'contains'
                                    }

                                },
                                {
                                    field: "CustomerId",
                                    title: "Customer Id",
                                },
                                {
                                    field: "SalesPersonName",
                                    title: "Sales Person",
                                    editor: "AutoComplete",
                                    editorOptions: {
                                        dataSource: {
                                            serverFiltering: true,
                                            transport: {
                                                read: {
                                                    url: "/SalesPerson/Search",
                                                    dataType: "json",
                                                    type: "POST"
                                                },
                                                parameterMap: (options, operation) => {
                                                    return {
                                                        text: (options.filter.filters[0] !== void 0) ?
                                                            options.filter.filters[0].value :
                                                            null
                                                    };
                                                }
                                            }
                                        },
                                        dataTextField: "FullName",
                                        template: '#: data.FullName #',
                                        minLength: 3,
                                        highlightFirst: true,
                                        suggest: true,
                                        valuePrimitive: true,
                                        select: (e) => {
                                            model.set("SalesPersonId", e.dataItem.Id);
                                        },
                                        enforceMinLength: true,
                                        filter: 'contains'
                                    }

                                },
                                {
                                    field: "Manager",
                                    title: "Manager",
                                    editor: "AutoComplete",
                                    editorOptions: {
                                        dataSource: {
                                            serverFiltering: true,
                                            transport: {
                                                read: {
                                                    url: "/Manager/Search",
                                                    dataType: "json",
                                                    type: "POST"
                                                },
                                                parameterMap: (options, operation) => {
                                                    return {
                                                        text: (options.filter.filters[0] !== void 0) ?
                                                            options.filter.filters[0].value :
                                                            null
                                                    };
                                                }
                                            }
                                        },
                                        dataTextField: "FullName",
                                        template: '#: data.FullName #',
                                        minLength: 3,
                                        highlightFirst: true,
                                        suggest: true,
                                        valuePrimitive: true,
                                        select: (e) => {
                                            model.set("ManagerId", e.dataItem.Id);
                                        },
                                        enforceMinLength: true,
                                        filter: 'contains'
                                    }

                                }

                            ]
                        }
                    },
                    {
                       //step 2 code here//
                    },

                ]
            })
        },
        sortable: true,
        resizable: true,
        pageable: {
            pageSizes: false,
            messages: {
                empty: ""
            }
        },
        filterable: true,
        persistSelection: true,
        noRecords: true,
        messages: {
            noRecords: "No records found"
        },
        dataSource: gridDataSource(),
    }).data("kendoGrid");
},
Paul
Top achievements
Rank 1
Iron
 answered on 13 May 2025
0 answers
15 views

When you touch-drag the grid, it doesn't look good if you move it diagonally. It's confusing. It looks distracting. What if you only want it to move up and down, or left and right?

Isn't there a very simple code?

Thank you.

 

 

n/a
Top achievements
Rank 1
Iron
Iron
 asked on 08 May 2025
1 answer
20 views

Expected:

When a scrollable grid has loaderType = 'skeleton', and when a user clicks sort on a column, the scroll bar will not move.

Actual:

The scrollbar resets to the beginning.

 

Code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet</title>

    
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2025.1.227/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/10.2.0/default/default-ocean-blue.css">
<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
</head>
<body>
  
<div id="grid"></div>
<script>
// The dataSource is initialized as a stand-alone widget that can be bound to the Grid.
var dataSource = new kendo.data.DataSource({
  transport: {
    read: {
      // The remote endpoint from which the data is retrieved.
      url: "https://demos.telerik.com/kendo-ui/service/products",
      dataType: "jsonp"
    }
  },
  pageSize: 10
});

$("#grid").kendoGrid({
  // The dataSource configuration is set to an existing DataSource instance.
  dataSource: dataSource,
  pageable: true,
  columns: [
    {width: 500, field: 'ProductID' },
    {width: 500, field: 'ProductName' },
    {width: 500, field: 'UnitPrice' },
    {width: 500, field: 'UnitsInStock' },
    {width: 500, field: 'Discontinued' },
    {width: 500, field: 'test' }
  ],
  scrollable: true,
  sortable: true,
  loaderType: "skeleton",
});
</script>
</body>
</html>

Dojo: https://dojo.telerik.com/gmdqkCcS

 

Is there a fix/workaround for this?

Neli
Telerik team
 answered on 08 May 2025
1 answer
16 views

Hello,

I'm trying to export a grid into a excel file with images but it's not working in 2024 version.

I had a 2022 version before and it was working, but upgrading for 2024.4.1112 it no longer works. It shows an error "The file wasn't available on site"

The example from https://dojo.telerik.com/RWscVNYF doesn't work. 

 

Can you please help?

Thank you.

Helena
Top achievements
Rank 1
Iron
 answered on 29 Apr 2025
1 answer
35 views

I'm using Kendo UI for jquery to show a grid in a bootstrap modal window.

The grid has column header filters, but the user cannot input text in the filter.

You can test this issue using this example:

https://dojo.telerik.com/ESmbjbbT/4


The full example code is:

<!DOCTYPE html>
<html>
<head>
    <base href="https://demos.telerik.com/kendo-ui/grid/filter-row">
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
    <link href="https://kendo.cdn.telerik.com/themes/10.2.0/default/default-main.css" rel="stylesheet" />
    <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
    
    
    
    <script src="https://kendo.cdn.telerik.com/2025.1.227/js/kendo.all.min.js"></script>
  
  	<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">
	<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/js/bootstrap.bundle.min.js" integrity="sha384-k6d4wzSIapyDyv1kpU366/PK5hCdSbCRGRCMv+eplOQJWyd1fbcAu9OCUj5zNLiq" crossorigin="anonymous"></script>
    
    
</head>
<body>
    <div id="example">


    
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <div id="grid" />
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
      
    <script>
        $(document).ready(function() {
            $("#grid").kendoGrid({
                dataSource: {
                    type: "odata",
                    transport: {
                        read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
                    },
                    schema: {
                        model: {
                            fields: {
                                OrderID: { type: "number" },
                                Freight: { type: "number" },
                                ShipName: { type: "string" },
                                OrderDate: { type: "date" },
                                ShipCity: { type: "string" }
                            }
                        }
                    },
                    pageSize: 20,
                    serverPaging: true,
                    serverFiltering: true,
                },
                height: 550,
                filterable: true,
                pageable: true,
                columns: 
                [{
                    field: "OrderID",
                    width: 80,
                    filterable: {
                        cell: {
                            showOperators: false
                        }
                    }
                },
                {
                    field: "ShipName",
                    width: 180,
                    title: "Ship Name",
                    filterable: {
                        cell: {
                            operator: "contains",
                            suggestionOperator: "contains"
                        }
                    }
                },{
                    field: "Freight",
                    width: 80,
                    filterable: {
                        cell: {
                            operator: "gte"
                        }
                    }
                },{
                    field: "OrderDate",
                    width: 95,
                    title: "Order Date",
                    format: "{0:MM/dd/yyyy}"
                }]
            });

          
        });
    </script>
</div>



</body>
</html>

Neli
Telerik team
 answered on 28 Apr 2025
2 answers
35 views

Hi;

I have a problem with kendo grid on rtl languages. the horizontal scrollbar doesn't move as I drag a column in order to reorder it!

and when trying to move the last column, the scrollbar jumps to the beginning and doesn't let you do your thing.

Here is a replication of my problem:
https://dojo.telerik.com/pMuIrqLj

can anybody help me solve this issue?

Neli
Telerik team
 answered on 17 Apr 2025
1 answer
27 views

Hi, 

 

I have few questions regarding kendo grid, i have implemented kendo grid for three nested levels, in every level it has checkboxes, i want to do if i select the parent level checkbox, it should  expand its child and all child checkboxes should also selected, is it possible in kendo-grid??
if so do you have any demo link?

i have attached the image for you understanding, but in that it has only one level, in my case i have two nested levels

Thank you

Neli
Telerik team
 answered on 16 Apr 2025
0 answers
20 views
Settings of the data source are as follows:

$scope.dataSource = new $kendo.data.DataSource({ pageSize: 10, serverPaging: false, serverFiltering: false, schema: { model: { id: "id" } }, transport: { read: read } });

 

$scope.gridOptions = {
    selectable: "multiple",
    pageable: {
        pageSizes: [5, 10, 15, 20, 25, 50]
    },
    persistSelection: true,
    resizable: true,
    filterable: { mode: "row" },
    sortable: {
        mode: "multiple",
        allowUnsort: true
    }
};

 

// template

<div kendo-grid k-data-source="dataSource " k-options="gridOptions">
</div>

Even if the serverFiltering is set to false, when I write something to the filter textbox, the read function is invoked, but just for the first time.

Any help, please?

Jiří
Top achievements
Rank 1
 updated question on 15 Apr 2025
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?