Telerik Forums
Kendo UI for jQuery Forum
1 answer
506 views

Hi guys

I have a treeview which has some rules about the exact location that certain nodes can be dragged to.

I have been working through the logic and getting there, except I cam across this challenge

If I have 3 nodes and the same level and drag a new node between them

Node1

   drag position a

Node2

drag position b

Node3

It appears that if the mouse is closets to Node2  at both drag position A and B, I can get the same drag events.

To be clear, dropTarget = 'Node2' and status is  'i-insert-middle' can happen at both Drag A and Drag B  if the mouse is closest to Node2.

I think easiest demonstrated in this simple Dojo  I have filtered out all events other than target for the second node and insert middle events.

drag and drop drag events

Dragging on each side of the second node can give the same drag events  as per attached screen shots which show the same events for the different locations. of the drag

How can I determine where the exact location the user is dragging to? ( before they do it , so I can deny or allow)

Many thanks

Rob

Neli
Telerik team
 answered on 21 Jun 2021
3 answers
2.0K+ views

I am using Telerik Kendo File Upload for uploading folder. In Production environment, few users are complaining issue with Folder Upload, during upload few files get errored out, using Developer tool in the console tab it logs "ERR_HTTP2_PROTOCOL_ERROR" error as attached for the failed files.

When i am trying i am not getting this error and all folders are getting uploaded properly. I asked user to share the files for which they are facing error and when i tried it uploaded successfully. When user tried again uploading same files which errored out it got succeeded today which were failing yesterday but sill there are files which is giving the same error.

I went through a post where it say the problem could be due to use of HTTP/2 and when they switched to HTTP /1.1 it worked fine. We are also using HTTP/2 but we don't have option of going back to HTTP/1.1. Link below :

 

https://www.telerik.com/forums/problems-with-multi-file-upload-and-http-2

 

Any suggestions ?

 

Neli
Telerik team
 answered on 21 Jun 2021
1 answer
183 views

Hey all I need a hand here. I've been at this for a few hours now and I just can't find how this code is bringing back the old value(s).

    const onCheck = (e) => {
        let listBox = $("#Sources").data("kendoListBox"),
            treeView = $("#availableSources").data("kendoTreeView"),
            selection = [],
            getSelection = (items) => {
                items.forEach(item => {
                    if (item.hasChildren) {
                        getSelection(item.items);
                    } else if (item.checked) {
                        selection.push(item);
                    }
                });
            };

        if (e.node.attributes[3].value == "false") {
            listBox.remove(listBox.items());
            $("#Sources option[value='" + listBox.dataSource._data[0].value + "']").remove();
            //selection.pop(listBox.dataSource._data[0]);
        } else {
            getSelection(treeView.dataSource.data());

            if (selection.length) {
                selection.forEach(item => {
                    listBox.add({
                        text: item.text,
                        value: item.id
                    });
                });
            }
        }
    }

As an example say I checked the item Github and it places it into the listbox just fine. It also adds the ID of the item to the hidden select component.

enter image description here

enter image description here

Now say I uncheck that item now:

enter image description here

enter image description here

Great! It removed the item from the listbox and also from the hidden select component. However though, when I chose another item, say GitHubIssues I am presented with not only that item in the listbox but the pervious item is placed into the select component.

enter image description here

enter image description here

It has the correct item in the listbox but I am unsure as to why its keeping the previous value(s)?

Veselin Tsvetanov
Telerik team
 answered on 21 Jun 2021
1 answer
65 views

First, thank you and your team for the update.  I know how large of a project these can be.  Your team does wonders.

I just updated my development suite to R2-2021 SP1.  During your setup wizard you are given the choice to "Create Desktop Shortcuts".  It appears this release has a minor bug in that the "HTML Demos - Kendo UI for jQuery R2 2021 SP1" ignores this preference setting.  It creates a desktop shortcut even when told not to.  :-}

Obviously you have larger fish to fry but in your quest for perfection please patch this bug.  Having to delete one shortcut is obviously easier than 19 or more icons.

Thanks again for the update.

Dimitar
Telerik team
 answered on 21 Jun 2021
2 answers
827 views

Does the FileManager for Kendo UI support AngularJS like the grid?  I have tried initializing the file manager with the following code:

HTML

<div id="fileBrowser" kendo-file-manager="fileBrowser" k-options="fileBrowserOptions"></div>

NOTE: I have tried the following for the attributes:
kendo-file-manager
kendo-filemanager

AngularJS

$scope.fileBrowserOptions = {
        dataSource: {
            schema: kendo.data.schemas.filemanager,
            transport: {
                read: {
                    url: "/kendo-ui/service/FileManager/Read",
                    method: "POST"
                },
                create: {
                    url: "/kendo-ui/service/FileManager/Create",
                    method: "POST"
                },
                update: {
                    url: "/kendo-ui/service/FileManager/Update",
                    method: "POST"
                },
                destroy: {
                    url: "/kendo-ui/service/FileManager/Destroy",
                    method: "POST"
                }
            }
        },
        uploadUrl: "/kendo-ui/service/FileManager/Upload",
        toolbar: {
            items: [
                { name: "createFolder" },
                { name: "upload" },
                { name: "sortDirection" },
                { name: "sortField" },
                { name: "changeView" },
                { name: "spacer" },
                { name: "details" },
                { name: "search" }
            ]
        },
        contextMenu: {
            items: [
                { name: "rename" },
                { name: "delete" }
            ]
        },
        draggable: true,
        resizable: true
    };

 

When I run the code nothing happens.  No errors in the console.

 

Thanks for any help.
Robert

Ianko
Telerik team
 answered on 21 Jun 2021
1 answer
408 views

Hi Telerik Team,

I'm using k-textbox for filtering rows in a grid.

We used custom filter when type in the filter textbox we make a server call to bind also when I click outside of the textbox on the grid page again the transport.Read event gets called when it lost focus.

Is there a way to prevent this ?

Thanks for your answer.

Regards,

Senthilkumar

Georgi Denchev
Telerik team
 answered on 21 Jun 2021
0 answers
88 views

Hi 

everyone, please vote using following link to request a feature change for multicolumn combo box column sorting.

 

 

MultiColumnComboBox sorting (telerik.com)

thanks

 

hassan
Top achievements
Rank 1
Iron
 asked on 21 Jun 2021
1 answer
231 views

In the documentation I found how to change the main tooltip for a task start/end. Actually I want to keep it.

But how could I change only the planned tooltip? 

Neli
Telerik team
 answered on 21 Jun 2021
1 answer
438 views
Can the treelist support this as I am using locked columns but also need to use row-templates and those do not work with locked columns.. I need to be able to scroll some columns horizontally....
Georgi Denchev
Telerik team
 answered on 18 Jun 2021
1 answer
135 views

Hello,

I have treelists with two levels of items (titles and positions). The titles can be rearranged via drag&drop. Dragging a title onto another title changes the order of titles. Positions can both be dragged under the same title but also to an other title.

Examples:

  • Dragging title 4 onto title 2 makes title 4 the new title 2, title 2 becomes title 3 and title 3 becomes title 4. All subitems (positions) stay with their titles.
  • Dragging position 4 in title 3 (3.4) onto position 2 in title 3 (3.2) makes 4 the new 2 (3.2), 2 the new 3 (3.3) and 3 the new 4 (3.4).
  • Dragging position 4 in title 3 (3.4) onto position 2 in title 2 (2.2) makes 4 the new 2 in title 2 (2.2), 2 in title 2 the new 3 in title 2 (2.3) and position 5 in title 3 (3.5) the new position 4 in title 3 (3.4).

To do this (see code in attachment) I manipulate the title field and the parentId of the datasource. This worked fine as long as I dirctly saved items that were added to the list. But now I have to use batch save.

Now when I add a new title to the list and add or rearrange positions to that title or rearrange titles via drag&drop before saving the affectet titles and positions are attached to wrong parent items, sometimes items get duplicated. Doing the same thing after saving works as intended.

I assume the reason for this is that new items have an Id of 0 before saving.

I see that it is possible to rearrange items in treelists via drag & drop in your demos without manipulating these fields manually. But I don't see how can do this and get the same results as in the examples above. Could you please help me figure this out?

Note: in the attached files I have included sampledata as local data. In the project we bind to remote data. Not sure if this affects the beavior

Georgi Denchev
Telerik team
 answered on 18 Jun 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?