|Re: drag and drop support [message #1809411 is a reply to message #1809303]
||Mon, 15 July 2019 18:38
|| Beat Schwarzentrub
Registered: November 2010
Missing name Mising name wrote on Fri, 12 July 2019 16:50|
Is there some example for a drag and support for rows? I´m trying to reorder rows in a hierarchycal table, and looking at the AbstractTableField looks it does it, but I wasn´t able to drag a row with the mouse (row gets selected, instead of "captured").
Unfortunately, the drag&drop implementation on tables and trees is currently missing, and will probably stay absent for quite another while... :(
It is not that that easy to implement, especially if both "moving" and "selecting" should be possible at the same time. Moving rows within a hierarchical structure has the potential for even more complicated problems, such as keeping levels or deciding whether a node should be moved "just below" the current node's parent or as last child of that parent.
If this is not the case, I will create a column with a burger image, in order to move the row as long as the user moves the burger image. Would you guys follow this approach?
If you want to keep it simple, I would recommend adding "Move up"/"Move down" menus to the table (like in the column organize dialog on table pages, inside the little "gear" icon menu). The AbstractTable also offers methods to change the row order. This approach might not be the prettiest or most user friendly one, but it is very easy to implement and requires very little code. As a bonus, it also works nicely on touch screens.
Powered by FUDForum
. Page generated in 0.01530 seconds