Telerik Forums
Kendo UI for jQuery Forum
1 answer
36 views

When there is a second item in a row and both are expanded the value is no longer sliced(filtered?) by the first item. My users are used to this with excel etc and really want this functionality how can I achieve it?

Value sum is correct (sliced) for all rows

where second row is expanded and not correct(sliced?).

 

Here is a simplified version of my code showing the unwanted behavior

<!DOCTYPE html>
<html lang="en">
<head>
  <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
  <link href="../../styles/default-ocean-blue.css" rel="stylesheet">
  <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
  <script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
  <script src="../../js/kendo.all.min.js"></script>
  <script src="../content/shared/js/console.js"></script>
</head>
<body>
  <div id="container">
    <div id="pivotgrid"></div>
    <div id="configurator"></div>
    <div id="pivotbutton"></div>
  </div>
  <script>
    var dataSource = new kendo.data.PivotDataSourceV2({
      "data": [
        { "Value": 77, "ASort": 2, "BSort": "b" },
        { "Value": 28, "ASort": 1, "BSort": "a" },
        { "Value": 63, "ASort": 2, "BSort": "a" },
        { "Value": 42, "ASort": 1, "BSort": "b" }
      ],
      rows: [
        { name: "ASort", expand: true },
        { name: "BSort", expand: true }
      ],
      "schema": {
        "model": {
          "fields": {
            "Value": { "type": "number" },
            "ASort": { "type": "number" },
            "BSort": { "type": "string" }
          }
        },
        "cube": {
          "dimensions": {
            "ASort": { "caption": "ASort" },
            "BSort": { "caption": "BSort" }
          },
          "measures": {
            "Value sum": {
              "field": "Value",
              "format": "{0:n}",
              "aggregate": "sum"
            }
          }
        }
      }
    });


    $(document).ready(function () {
      window.pivotgrid = $("#pivotgrid").kendoPivotGridV2({
        height: $(window).height() - 2,
        dataSource: dataSource

      }).data("kendoPivotGridV2");

      $("#configurator").kendoPivotConfiguratorV2({
        dataSource: pivotgrid.dataSource,
        filterable: true,
        sortable: true
      });

      $("#pivotbutton").kendoPivotConfiguratorButton({
        configurator: "configurator"
      });

      $("#container").kendoPivotContainer({
        configuratorPosition: "left"
      });
    });
  </script>

</body>
</html>


Nikolay
Telerik team
 answered on 15 May 2025
2 answers
10.6K+ views
Hi all,

I am building a web application that collects information about emergency drills, such as evacuation drills, tornado drills, etc. As you could imagine recording what time the drill was conducted is extremely important.

Well, the Kendo DateTime pickers are adding the timezone offset to the time value when the value is sent to the server. Receiving from the server works fine. 

Everybody that is using my web application is in eastern time zone, no exceptions. The timezone is GMT-5 currently. Let's use an example: a user submits a drill for 12/04/2014 1:00 PM. The time gets sent to the server but the timezone affects the time, so it will be stored in the database as 12/04/2014 6:00 PM. The timezone adds 5 hours when sent to the server. When we are in daylight savings time we are GMT-4 and 4 hours are added to the time. When my app requests the information from the server it works fine. If the server sends back 12/04/2014 1:00 PM it will display as such on the web page.

My current fix it to subtract 5 hours from the time before it is sent to the server. I don't like that because every time we go through day light savings time I have to update my code back and forth between 4 hours and 5 hours. I guess I could find the time zone from the time string and subtract whatever it is currently, but I don't like that. How can I fix this?

Thanks
Darron
Top achievements
Rank 1
Iron
 answered on 14 May 2025
1 answer
41 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
2 answers
28 views
  1. This is the console display of my numeric textbox with draggable = false. When inspecting the DOM in chrome, the attribute shows up on the input you dynamically create. However, if I select the whole number with my mouse it can easily still drag the number into a neighboring textarea. I need to be able to cut, copy, paste on both of these controls. Is there a way to force Chrome to not allowing dragging here?
  2.  
  3.  
  4. {prefix: '', name: 'NumericTextBox', decimals: 2, autoAdjust: true, enable: true, â€¦}
    1. autoAdjust: true
    2. culture: ""
    3. decimals: 2
    4. downArrowText: "Decrease value"
    5. draggable: false
    6. enable: true
    7. factor: 1
    8. fillMode: "solid"
    9. format: "0.00"
    10. label: null
    11. max: null
    12. min: null
    13. name: "NumericTextBox"
    14. placeholder: undefined
    15. prefix: ""
    16. prefixOptions: {separatortrue}
    17. restrictDecimals: false
    18. round: true
    19. rounded: "medium"
    20. selectOnFocus: true
    21. size: "medium"
    22. spinners: false
    23. step: 1
    24. suffixOptions: {separatortrue}
    25. upArrowText: "Increase value"
    26. value: null
    27. [[Prototype]]: Object
ROBBE
Top achievements
Rank 1
Iron
Iron
 answered on 08 May 2025
0 answers
27 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
33 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
3 answers
188 views
Hello,

When focused in the HTML editor, I set the default font and font size and add a p tag to the outermost.
Then when I try to get the editor value with editor.value() it automatically gets a space '&nbsp;' is being added, but when I read it with editor.body.innerHTML there is no space.
This does not allow you to check whether the space was added by the user.

If from now on I get the editor value with editor.body.innerHTML, could problems occur?
Or what can I do so editor.value() doesn't automatically add spaces?

Thanks

 


<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({ tools: [
    "bold", "italic", "underline", "fontName", "fontSize"
  ]});
var editor = $("#editor").data("kendoEditor");
$(editor.body).focus(function (e) { editor.exec("fontName", { value: "Tahoma" }); editor.exec("fontSize", { value: "10pt" }); var content = editor.value(); if (content.indexOf('<p') !== 0) editor.value('<p>'+ content +'</p>'); console.log(editor.value()); console.log(editor.body.innerHTML); });
</script>


Result:
editor.value():  <p><span style="font-family:Tahoma;font-size:10pt;">&nbsp;</span></p>
editor.body.innerHTML:  <p><span style="font-family:Tahoma;font-size:10pt;"></span></p>
Yordan
Telerik team
 answered on 07 May 2025
1 answer
807 views
PS C:\....\telerik\kendouiTest> npm install @progress/kendo-ui
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated gauge@3.0.2: This package is no longer supported.

added 82 packages, and audited 86 packages in 34s

16 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Nikolay
Telerik team
 answered on 05 May 2025
1 answer
42 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
31 views

Hello~

code:  format: "#.000 kg"

input: 76.123

result: 76.12

why???

 

 

https://dojo.telerik.com/CgPMEaiE

 

Nikolay
Telerik team
 answered on 29 Apr 2025
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?