Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Delete a root-level task
posted

Hi there.

I have a GanttView bound to a BusinessObject. It has been working fine but only now I noticed it will throw an exception if a root-level task is deleted. Once the root-level task is deleted, the GanttView will delete the root-level and all tasks that belong to the root-level tasks collection in the viewer, but in the underlying datatable, only the root-level task row will be deleted. Once the user saves his work and afterwards gets back to the same project, the GanttView won't find the root-level row for the tasks that were left orfans in the database, which will throw an exception.

Thinking this could be a BusinessObject problem, I wrote the same program using a regular dataset in the same way the documentation shows it as a sample. The children rows in the dataset won't be deleted either.

Could you guys think of a workarong for this?

Thanks in advance.

Ivan

PS: I went ahead and built a sample using the same code provided on the help file ( http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=WinGanttView_DataBinding_Support_for_WinGanttView.html ) and attached to this post. You can delete a sub-task and check the grid to see that it works fine. But then go and delete a root-level task and then the grid will show that only the root-level row was deleted from the table, although the GanttView won't show them anymore. Then, just click the Requery button and you will get the error.

GanttViewSample.zip