Telerik Forums
Kendo UI for jQuery Forum
2 answers
21 views

Hi, we were testing Telerik Server Grouping with virtualization, as it is shown in the example for it and we are seeing strange behaviour.

When I select a group which has enough records inside, the scrolling in the group down to make it request another page will actually append again the same records which are already displayed - from the first page actually.

The easiest steps to reproduce this behaviour is

1. Go to demo page 

https://demos.telerik.com/kendo-ui/grid/server-grouppaging-virtualization and click to Edit in Dojo. It opens https://dojo.telerik.com/afoCefOJ

Then, to get rid of narrow groups I will change grouping from 

group: [{
                        field: "city",
                        dir: "asc"
                    }, {
                        field: "companyName",
                        dir: "asc"
                    }],

to

group: [{
                        field: "city",
                        dir: "asc"
                    }],

and also adjust pageSize to 10:

pageSize: 10,

2. Now, when I Run example, open Chrome Debug tools to Network traffic and expand Shady shores, I get records starting with:

GC30TRSSMTI706Z, Ireland

I can see first request starting wtih Page:1

3. Now I scroll the virtual view just a bit down to get another 10 records. Surprisingly, I get same records again.

GC30TRSSMTI706Z, Ireland

Is it expected behaviour, or how can I fix it to scroll to next records on another request ?

Thank you kindly,

Martin

Neli
Telerik team
 answered on 22 Jun 2021
0 answers
6 views

Hi experts,

I have run into a problem where i have to update existing kendo grid implementation. Let me explain the ask as below.

Earlier we had a grid which was mapped with individual fields. For example, lets say i had a data of an employee which contains employee name, age, salary, address and department, perfect one-to-one mapping.

Now lets says employee got multiple departments. Business wants to keep same structure but change only Department column into multiple rows. Like if there are 2 departments for a particular employee i should have 2 rows in a single column against that employee. Have a look at the image attached. have a look at row 2 and column 3 and 4.

I am able to show it using template but while editing and saving it could not map to the actual field of array.

 

 

Varun
Top achievements
Rank 1
 asked on 21 Jun 2021
2 answers
13 views

  1. Enable serverPaging, serverSorting, virtual scroll. Please refer the attached codes.
  2. Run the page in browser.
  3. Drag scrollbar to end
  4. Click "name" column header to sort the grid.

Observed:

Grid only shows the last 3 rows.

Question:

How can I make last ten rows show after sort? Like this:


<html>
	<head>

		<link rel="stylesheet" href="styles/kendo.common.min.css"/>
		<link rel="stylesheet" href="styles/kendo.default.min.css"/>

		<script src="jquery-3.6.0.js"></script>
		<script src="kendo.all.js"></script>

		<style>
			.grid {
				width: 800px;
				height: 400px;
			}
		</style>
	</head>
	<body>
		<div class="grid"></div>
<script>
	$(()=>{
	var ds = [];
	for(var i=0;i<13;i++){
		ds[i]={name:i.toString(),number:i};
	}

	var dataSource = new kendo.data.DataSource({
		serverPaging:true,
		serverSorting:true,
		pageSize:10,
		type: "odata",
		transport: {
			read: options=>{
				var d=[];
				for(var i =options.data.skip;i<options.data.skip+options.data.take && i<ds.length;i++){
					d.push(ds[i]);
				}

				var r = {
					d: {
						__count: ds.length,
						results: d
					}
				};

				options.success(r);
			}
		}
	});

	$(".grid").kendoGrid(
		{
			sortable:true,
			columns:["name","number"],
			dataSource:dataSource,
			scrollable: {
				virtual: true
			}
		}
	);
});
</script>
	</body>
</html>

Neli
Telerik team
 answered on 21 Jun 2021
1 answer
6 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
17 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
5 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
4 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
5 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
8 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
5 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
 asked on 21 Jun 2021