GanttChart MultiSelection not working when selected Shape is out of visible area
Hello,
when I select multiple Shapes in the GanttChart and I want to DnD all selected Shapes only the visible Shapes will be moved. All selected Shapes who are not visible e.g. when I scroll down are not moved.
When I scroll up the Shapes are not selected anymore after the DnD. You can reproduce this behaviour here: https://sapui5.hana.ondemand.com/#/sample/sap.gantt.sample.BasicGanttChart/preview
1: Expand the Concept Phase 2: Select the Detailed Project Planning 3. Scroll Down 4. Select and move the Design Phase 5. Scroll up the the first selected Shape (step 2). The Shape is not selected anymore.
@Myge91 Please elaborate with a video/image of the issue in order to forward it to the correct developers. Also I will appreciate it if you check v1.48.10 https://sapui5.hana.ondemand.com/1.48.10/#/sample/sap.gantt.sample.BasicGanttChart/preview
Thank you
Hello,
for my project I cannot use 1.48.10 because I get instantly an undefined error:

You can reproduce this pretty simple if you remove the
oGanttChartWithTable.bindAggregation("rows",
from
https://sapui5.hana.ondemand.com/#/sample/sap.gantt.sample.BasicGanttChart/code/BasicGanttChart.controller.js
With 1.46.12 I don't get this error. Could you provide a SAPUI5 version 1.48.x where this error is fixed? If yes I can provide you an example with mockdata to reproduce the issuetitle.
@Myge91 I can reproduce the error and it is logged for research internally with ticket #1770484498 . Updates will be posted here as well. You can set the rows aggregation to an empty object to avoid the error - rows: "{}".
Can you confirm that v1.48.10 resolves the originally reported issue by using the online example - https://sapui5.hana.ondemand.com/1.48.10/#/sample/sap.gantt.sample.BasicGanttChart/preview ?
Thanks for the hint with the empty aggregation.
I still can reproduce this bug with the UI5 1.48.10:
https://youtu.be/A64_wHgM0NQ
In this video you can see that the parameter oEvent in the method handleShapeDragEnd contains only the visible shapes that I have dropped.
@Myge91 The issue with the row aggregation is already in development. I am still looking into the original question
I could provide you a running example with mockdata if it helps
@Myge91 the issue with the missing rows is fixed in SAPUI5 master branch. About the original issue, if you have an example that isolates the problem in a smaller snippet, it will ease the investigation of the issue. Thanks
@stephania87 You can download a running example here: https://drive.google.com/open?id=0B2130ROZ3Xk9b2xYM3J6V1NlVzA
You can import this into the WEBIDE and run it with the urlparameter responderOn=true
Click on the round button to select the Variant "Variante Werder (Havel)" and click on "Start"

You should see this:

Select the first shape in the second row like on the screenshot above.
Select a shape in the last row where you can see shapes (scroll down to the bottom). Make sure that the first selected Shape is not visible.
Before you move the Shape set a breakpoint into the method cockpit.controller.js#handleShapeDragEnd
Now move the Shape. You will see that the oEvent has only the visible Shape and not all selected Shapes.
This is the result I get when both Shapes are visible:

This is the result I get when the first one is not visible and I move the last one:

Hi,
I just want to let you know that I still have this problem with the latest SAPUI5 version 1.50.6.
Regards,
Jan
I have not forgotten. I am just slow :) Thank you for the update
Apologies for the long waiting.
The issue with the rows aggregation is fixed (latest public SAPUI5) and distributed to older versions as well (1.44, 1.48, 1.50) The issue is reproducible with the given project, but the selected items are not lost even if the item is not into view with the default settings of the control here - sap.gantt.sample.BasicGanttChart_modified.zip
I am trying to compare the custom settings of shapes, to no avail for now
@Myge91 Apologies for the long waiting. The case is forwarded for a check by experts in the field of the Gantt Chart Colleagues, please use #1870109604 for reference
@Myge91 Hi I have taken this issue. I am trying finding out the root cause for this issue, debugging currently. Could you please tell me if you are using the OData binding? Because there is something limitation for the OData binding in Gantt right now.
Thanks, Roger
Hi @NIROG ,
yes we are using oData binding.
Regards
Jan
Hi @Myge91 Thank you for the quick reply. I am sorry the Gantt only supports display when OData binding is adopted, In this circumstance, features like DnD is not supported right now. You could have a try with JSON binding.
BR, Roger
Hi @NIROG ,
thanks for your quick reply. There is not limitation in the documentation in case of using oData binding and DnD: https://sapui5.hana.ondemand.com/#/api/sap.gantt.GanttChartBase
So according the documentation oData binding should support DnD as it's supports with JSON binding.
A customer of us is using a tool with the GanttChart and oData binding in his production environment. DnD works without any problems as long as shapes in the visible area are selected. So your message " features like DnD is not supported right now" seems not to be correct.
We try to prevent to use JSON binding because it costs a lot of unnecessarily work. We would need to load the oData with read -> convert into a JSON model -> bind it -> convert back to oData in case of CRUD operations -> refresh oData model -> convert new data to JSON JSON model is way to exensive on most cases when you develop software for customers and you have to be in the budget limit.
Regards
Jan
Hi @Myge91 Sorry for the late update. I think I might not make myself understood, the DnD in OData binding does work when some selected shapes in visible area, but doesn't otherwise, but in fact, so we do not recommend you use OData binding. We are sorry, we understand the problem and are working on it, but please don’t expect a solution soon because it’s difficult and big effort. Thanks for understanding.
BR, Roger
Hi @NIROG ,
thanks for your reply. Could you do the UI5 Community a favor and write the information above in the API description of the GanttChart? I understand that the issue is not easy to fix/implement but when a control has limitations the developers should know that. If I knew that before I started to work with the GanttChart I would have been better prepared what I can tell the customer what works and what not.
IMHO is everything a very important information when some features just work with JSON binding or just with oData binding.
by the way that is not a part of this ticket but could you give us a feedback about this ticket?: https://github.com/SAP/openui5/issues/1790
Hi
On the newer version of Gantt Chart -> sap.gantt.simple.GanttChartWithTable -> edit capabilities (drag and drop / resize) are also supported with OData Model. Please refer to the sample : https://sapui5.hana.ondemand.com/#/entity/sap.gantt.simple.GanttChartWithTable/sample/sap.gantt.sample.GanttChart2OData to work around the new Gantt and get an idea about the new functionalities
Thanks, Reshma