Completed
Last Updated: 03 Jun 2024 08:12 by ADMIN
Release 2024 Q2 (May)
William Wittsche
Created on: 15 Nov 2022 12:40
Category: Grid
Type: Bug Report
4
Grid drag&drop row to an empty Grid is not working

Bug report

Dragging a row from a Grid to another empty Grid is not working.

Reproduction of the problem

  1. Open the following dojo:
    https://dojo.telerik.com/EGIyemen
  2. Try to drag a row to the empty Grid

Current behavior

The row is not inserted in the empty Grid

Expected/desired behavior

The row should be inserted in the empty Grid.

Environment

  • Kendo UI version: 2022.3.1109
  • Browser: [all]
4 comments
ADMIN
Alexander
Posted on: 03 Jun 2024 08:12

Hi William,

In order to indicate that the Grids are empty, I would advise adding the following layer of logic within the "onRowRеordered" handler:

<script>
	function onRowRеordered(ev) {
		...
		if(externalGrid.dataSource.total() === 1 && externalGrid.dataSource.data()[0].dummy == true){
			externalGrid.pager.element.find(".k-pager-info").text("0 items");
		}
		...
	};
</script>

This should produce the following result:

Here is a revamped version of the dojo example:

Kind Regards,
Alexander
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Martin Robins
Posted on: 01 Jun 2024 10:10

Alexander,

First of all thanks for getting back to me.

I like the alternative solution you have provided, however that does result in the grid footer showing "1 - 1 of 1 items" when really there are no items.

Is there a way to override this as a part of the solution too?

Martin.

ADMIN
Alexander
Posted on: 23 May 2024 04:58

Hi Martin,

Thank you for reaching out.

I believe that the following is symbiotically connected with the following GitHub Issue:

Notice, that after further discussion, the final verdict to handle this issue is by custom implementation since the drag and drop between grids is a custom implementation as well. As a consequence, the following demo has been updated:

The demo now utilizes a dummy record which can be perceived as a way of circumventing the requirement for having at least one row/record since the drop target is the "row" element.

Please give this suggestion a try and let me know if this helps.

Kind Regards,
Alexander
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Martin Robins
Posted on: 16 May 2024 08:43
I have just tried this in the dojo using the original code and the latest 2024.2 library and as far as I can see it still does not work.