Dragging a row from a Grid to another empty Grid is not working.
The row is not inserted in the empty Grid
The row should be inserted in the empty Grid.
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.
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.
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.