Telerik Forums
Kendo UI for jQuery Forum
1 answer
215 views

Hi,

I just upgraded to Kendo UI 2021 R1 version from 2020 R2.

Now I am trying to implement simple predefined (column) views for my gantt widget.

I have approx. 35 possible columns for my gantt and five "config" arrays which define which columns should be visible and in which order (usual case is 5-10 columns visible at the time). I have five buttons which trigger reorder and show/hide columns methods from gantt list.

I made this to work, but this tends to be quite slow specially if my project has many elements in tree.

Just to reorder elements before showing/hiding them, it takes more than half second (closer to 1 sec) per item to reorder as shown below.

measure reorder 0.9938250000122935
measure reorder 0.84582499996759
measure reorder 0.8179099999833852
measure reorder 0.8124349999707192
measure reorder 0.8222400000086054
measure reorder  0.670899999910034

Then, to show desired columns and hide others it takes additional 0.5 sec per hide/show method. (see below)

measure  show 0.5577549999579787
measure  show 0.43599000002723187
measure  show 0.4385149999288842
measure  show 0.42784000001847744
measure  show 0.44247000000905246

measure hide 0.4437199999811128
measure hide 0.440279999980703
measure hide 0.4344099999871105
measure hide 0.43585499993059784
measure hide 0.4289250000147149
measure hide 0.4369650000007823

This results in quite slow response - changing of views takes between 2 (smaller projects) to 10 seconds (medium/bigger projects).

measure table switch 9.914615000016056

Is there any better way to do this or could I simply prepare view in behind and replace current gantt.list.columns array with new one - because this switching logic is not acceptable from performance of point of view.

UPDATE: I tested further - seems that depth and how much tree is expanded is making a big impact on performance.

Thank you and best regards,

Vedad

Veselin Tsvetanov
Telerik team
 answered on 20 May 2021
0 answers
147 views

Hi Admin and everybody,

As title above, I using datasource to read data (url string) for Kendo Image Editor.

But when read new data with the same name (name = url string), it only retrieves the original preloaded images. But It runs normally when  I open F12 and check to "disable cache"  (image will show you)

Easier to understand, when starting to reload the page, the cache is empty, I load an image url string, it will show the image (Come here, run very well).

Then My Json read another image (it's a different picture) have the same name (name = url string) as the original image. It still shows the original image.

When I "F12" open DevTools then Network and check "Disable cache" (i understand it is not save cache), every time I run it, it's normal. It will show true/new image have the same name as the original image

What happend in my code.???

My code will show you :

var dataSourceGetImageUrlWithDrawing = new kendo.data.DataSource({
        autoSync: true,
        transport: {
            read: function (options) {
                $.ajax({
                    url: "/_layouts/xyz/getimageurl,   //my link API 
                    type: 'GET',
                    cache: false,
                    scriptCharset: "utf8",
                    dataType: "json",
                    data: {
                        models: kendo.stringify(options.data.models)
                    },
                    success: function (result) {
                        options.success(result);
                    }
                });
            },
        },
        schema: {
            data: 'data',
            model: {
                id: "imageUrlWithDrawing"
            }
        },
        change: function (e) {
            var view = dataSourceGetImageUrlWithDrawing.view()[0].imageUrlWithDrawing; //url in json data
            $("#imageEditorWithDrawing").kendoImageEditor({


                imageUrl: view,
                width: "100%",
                height: 650,
                saveAs: {
                    fileName: "image_edited.png"
                }
            });

            var imageEditorWithDrawing = $("#imageEditorWithDrawing").getKendoImageEditor();
            imageEditorWithDrawing.one("imageRendered", function () {
                imageEditorWithDrawing.executeCommand({ command: "ZoomImageEditorCommand", options: imageEditorWithDrawing.getZoomLevel() - 0.2 });
            });
        }
    });
Hope Admin and everybody help me. THanks so much.
Stark
Top achievements
Rank 1
Iron
Iron
 asked on 19 May 2021
1 answer
141 views

Hi Admin and everybody,

I want call function() when click into color area. 

It will get category and value corresponding to that region. 

Can Kendo Pie Charts do that? 

Hope to get a reply soon from Admn and everybody. Thanks so much.

Code Demo architecture that I want to apply:

<script>
        var data = [
            {
                "source": "Hydro",
                "percentage": 22,
                "explode": true
            },
            {
                "source": "Solar",
                "percentage": 2
            },
            {
                "source": "Nuclear",
                "percentage": 49
            },
            {
                "source": "Wind",
                "percentage": 27
            }
        ];

        function createChart() {
            $("#chart").kendoChart({
                title: {
                    text: "Break-up of Spain Electricity Production for 2008"
                },
                legend: {
                    position: "bottom"
                },
                dataSource: {
                    data: data
                },
                series: [{
                    type: "pie",
                    field: "percentage",
                    categoryField: "source",
                    explodeField: "explode"
                }],
                seriesColors: ["#03a9f4", "#ff9800", "#fad84a", "#4caf50"],
                tooltip: {
                    visible: true,
                    template: "${ category } - ${ value }%"
                }
            });
        }

        $(document).ready(createChart);
        $(document).bind("kendo:skinChange", createChart);
    </script>
</div>


Nikolay
Telerik team
 answered on 19 May 2021
4 answers
139 views

I want to make a grid with excel exporting feature which will export all data.

However, the grid might contain a massive amount of data that makes the export process spends lots of time.

I've found this that shows confirmation before exporting.

https://docs.telerik.com/kendo-ui/knowledge-base/export-the-grid-to-excel-only-after-confirmation

 

However, the confirmation popup window shows after loading all data (it popup after a few time after I click the export button, so I guess it loads all the data, or the excelExport event is activated after the excel file is well prepared to be exported).

Is it possible to show the confirmation window as soon as I click the export button?

 

Thanks.

Anton Mironov
Telerik team
 answered on 18 May 2021
8 answers
3.3K+ views
Hi, 

Our whole system is design for fast data input and one requirement is that both dot and comma be accepted as decimal delimiter. Input can be both "12,12" and "12.12". It's okay if both display the afterwards, as long as the input allows for it. In fact, .NET will force you to make a choice, which is OK. 

I made a little example that showcases our need (except it doesn't deal with selection) : http://trykendoui.telerik.com/ikId/2

Is there a way to have kendo do this for us (aka without this ugly hack)? Removing all kind of culture-related formating would be a plausible option, if possible. 

Thank you

---- 

Copy of the "hack": 

01.$('#numeric').on('keydown', function (e) {
02.    if (e.which == 188) {
03.        e.preventDefault();
04.        caret = $(this).caret();
05.        value = $('#numeric').val() + '';
06.        if (value.indexOf('.') < 0 && value.indexOf(',') < 0) {
07.            $('#numeric').val(value.substring(0, caret) + '.' + value.substring(caret));
08.            $(this).caret(caret + 1);
09.        }
10.    }
11.});


Alex
Top achievements
Rank 1
Iron
 updated answer on 18 May 2021
1 answer
713 views

Hi, 

We are looking to get tabs with menu list or dropdown kind think in it , with items in that , Below i have attached image of our requirement,

Kindly provide solution for above requirement  ,

 Thanks,

Mike

Neli
Telerik team
 answered on 18 May 2021
0 answers
285 views

Hi, 

We currently have a Kendo Editor with paste cleanup set as:

  pasteCleanup: {
all: false,
css: true,
custom: null,
keepNewLines: false,
msAllFormatting: true,
msConvertLists: true,
msTags: true,
none: false,
span: true

 

We've noticed an issue in that when copy and pasting underlined text within the control (not from external to the control), the underline is removed. I can only imagine that this is because we're stripping our SPANs with the above option. Our issue is that we can't really set this SPAN option to off as we explicitly do no want complex span elements being saved. Is there a workaround for this?

Thank you

Joseph
Top achievements
Rank 1
 asked on 17 May 2021
1 answer
58 views

I have Asp.net website , and telerik controls on it.  On page load I get ConvertFontToSpanfilter error as a alert. On clicking few times 'OK' on alert i am able to process normal.

I am not able to figure it out why it's happening . As i know we can disable the filter but is there any specific reason it's happening?

Neli
Telerik team
 answered on 17 May 2021
1 answer
191 views

I have a kendo ui jquery datasource that I'm using to populate my grid. I have added a custom toggle switch to show only active accounts or show all accounts. The switch works by calling the following function on change: 

    $(".my-page").on("change", "#myTableStatusToggle", function () {
        if ($("#myTableStatusToggle:checked").length > 0) {
            dataSource.filter({});
        } else {
            dataSource.filter({ field: "Status", operator: "eq", value: "Active" });
        }
    });
Unfortunately there is also a search box (the standard grid search box) and when the user types in the search box it searches all records. When the user clears out the search box it shows all of the records even though the toggle switch hasn't been touched. How do I search the grid while still respecting the toggle switch? 
Neli
Telerik team
 answered on 17 May 2021
1 answer
1.2K+ views

I have configured a grid and have set up the pager
pageable: {
                        refresh: true,
                        pageSizes: false,
                        buttonCount: 5,
                    },
This works everywhere else but in one grid where it shows a dropdown with page numbers  

as soon as I open dev tools it changes 

How can I get rid of that ?

Dimitar
Telerik team
 answered on 17 May 2021
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
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)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
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
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
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
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
AICodingAssistant
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?