Kendo ui tooltip content return "e.uniqueSort is not a function" error

534 Views Asked by At

I'm showing tooltip on kendo grid column. When i return string in content in kendo tooltip i get an error: "e.uniqueSort is not a function". I can't find any solution for this problem. this is my code:

gridMain.table.kendoTooltip({
      filter: ".meghdarVahedFari",
      position: "right",
      showOn: "click",
      autoHide: false,
      width: 200,
      content: function (e) {
            var grid=$("#grid").data("kendoGrid");
            var row = $(e.target).closest("tr");
            var dataItem = grid.dataItem(row);
            return dataItem.AmountFarei;
    }
    }).data("kendoTooltip");

and this is my grid:

function fillGrid(dataSource) {
var gridMain=$("#grid").kendoGrid({
        scrollable: true,
        filterable: {mode:"row"},
        height: 450,
        dataSource: {
            data: dataSource,       
            schema: {
                model: {
                    id:"ID",
                    fields: {
                        ID: {type: "number"},
                        Product:{type:"string"},
                        AmountFarei:{type:"number"}
                    }
                }
            },
            pageSize: 15
        },
        columns: [
            {field: "Product",title: "Product Code",width: "11%",attributes: {
                "class": "meghdarVahedFari"
                }
            }               
        ]
    }).data("kendoGrid");
1

There are 1 best solutions below

0
Farshad.Ranaei On

My problem was jquery version. according to: https://www.telerik.com/forums/-58994e55a90b

This problem will be fixed in our upcoming service pack release R2 2019 SP1.

You can solve this problem with change jquery version to 3.4.1. or if you can't change your version of jquery, you can add following code:

kendo.jQuery.uniqueSort = kendo.jQuery.uniqueSort ? kendo.jQuery.uniqueSort : kendo.jQuery.unique;

That used in: https://dojo.telerik.com/AGAsAKAG/3