简体   繁体   English

如何在 ag-grid 中实现多行拖动(角度)

[英]How to implement multiple row dragging in ag-grid (angular)

Am able to use cdk-drag with cellRendering and implement single drag and drop.我能够将 cdk-drag 与 cellRendering 一起使用并实现单次拖放。 I would like to implement multiple drag and drop.我想实现多个拖放。 Is there any way to implement multiple rows drag and drop with ag-grid?有没有办法用ag-grid实现多行拖放? If so please provide me with an example or suggest me with the better solution.如果是这样,请给我一个例子或建议我更好的解决方案。

If you are using smaller version than ag-grid 23 than it does not provide feature of multi-row dragging on lesser version of ag-grid.如果您使用比 ag-grid 23 更小的版本,则它不提供在较小版本的 ag-grid 上进行多行拖动的功能。

In ag-grid 24, you can implement by adding [enableMultiRowDragging] = "true" and rowSelection='multiple' but you also have to mention [pagination]="false" because it does not work with [pagination]="true"在 ag-grid 24 中,您可以通过添加[enableMultiRowDragging] = "true"rowSelection='multiple'来实现,但您还必须提及[pagination]="false"因为它不适用于[pagination]="true"

Thanks谢谢

It is possible to drag multiple rows at the same time, when enableMultiRowDragging is set to true in the gridOptions and it is combined with rowSelection='multiple' , and rowDragManaged=true .当在 gridOptions 中将enableMultiRowDragging设置为true并与rowSelection='multiple'rowDragManaged=true结合使用时,可以同时拖动多行。

Source: https://www.ag-grid.com/javascript-grid-row-dragging/资料来源: https://www.ag-grid.com/javascript-grid-row-dragging/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM