I've used this wonderful tutorial/sample to be able to show baselines for my tasks. Everything works as expected, and I am able to produce a nice representation of both my current timelines as well as my baselines. The problem I do run into is when I select any of the baseline representations. When I do, I get this unhandled exception:
For what it's worth, I have disabled all drag actions as they are not necessary for this project. I don't even need the ability to select a task by clicking on the timeline; however, I have not been able to identify a method for disabling this nor handling the error before it reaches an unhandled exception.
Would someone be able to provide me with a method of either disabling this or handling the error?
For another very minor question - is there a way I can force the rectangle for the baseline to go behind the task that the baseline is defined for? I'm assuming its a draw order, but honestly graphics are not my strong suit and I'm struggling with this.
Thanks!
Sorry I forgot to include the link to the sample I used...
http://es.infragistics.com/community/forums/t/63942.aspx
Another thing... when I have a baseline bar that starts or finishes beyond the timeline bar for that task, I can no longer calculate it's position. Is there a way I can find the X position based on the timeline's timeslots and then Y position from the task's position in the grid?
OK - I got the answer to my last question, so I just thought I would share.
Understandably, there does not exist a TaskUIElement for items that have no visual representation in the Timeline section of the Gantt. Rather than look for the TaskUIElement, I grabbed the TaskAreaUIElement. Once acquired, I reviewed all the RowUIElements in the Ultragrid section of the Ultraganttview, and added a TaskUIElement for those with Baselines. I referenced the TimeSlotUIElement to position in the X and the RowUIElement to position in the Y. This approach is working very smoothly.
I'm still struggling with handling the click event of a task.
Hi,
I'm glad to see that you are using my suggestion. About your issue with unhandled exception - it is cause because our SubTask is not include in the UltraCalendarInfo.Tasks collection and our SubTask does not contains a project.
Maybe the easiest way to solve this issue, could be if you set Enable = false property. For example:
Task subTask1 = new Task();
subTask1.Name ="SubTask 1";
subTask1.StartDateTime =DateTime.Today.AddDays(5);
subTask1.Duration =TimeSpan.FromDays(1);
subTask1.TaskSettings.Enabled =DefaultableBoolean.False;
Task3.MySubTask.Add(subTask1);
Let me know if you have any questions.
Hi
I have two questions in that.
1) Above code works well, but I'm not able to add color and drag operation for that subTask Timebar( I just want to avoid the error which I was getting in Click event of subTask)
2) I am not able drag and drop in Chart Area Part except Timebar. It because I want to create New task in the TimeLine Chart Area Portion. I'm using Mouse_Down,Up and Move event to get the date rang, but I'm not able view the dragged box in TimeLine Chart Area Portion.
please provide any sample for my above queries.
Thanks in Advance.
Thanks
Vivek K