Hello,
I need to support multiple types of tasks and ideally, when an operator enters them as a Gantt Chart item, a Task Information form that is specifically extended for that task type is opened.
For example, I need to represent 3 types of tasks that further extend the data in the Infragistics.Win.Tasks fields in unique ways:
Exposition ( additional fields expositionAuthority, fundedBudget )
Phase ( additional field phaseSponsor )
Task ( additional fields authorizationObtained, estimatedCost )
Expositions have many phases, phases have many tasks, so I'd need to manipulate the parentIDs to show ownership.
Is it feasible to do this? My vague idea is that I would need to handle the GanttView's taskAdded property change event, and use that to have my custom forms come up. From there, I'd populate populate all the data in the tables that I have bound to the gantt view. Would this approach work?
If so, that leads me to this question -- am I able to change the line items on the GanttView's right click menu? For example, can I change the line items from "Add Task" to "Add Exposition", "Add Phase", and "Add Task"?
Thanks, Myca
Myca,
You can change the GanttView's right click menu by using the ultraGanttView1_ContextMenuInitializing event, using code similar to the following snippet:
if(e.Area == Infragistics.Win.UltraWinGanttView.ContextMenuArea.Grid)
e.ContextMenu = customMenu;
Please let me know if you need more information.
Thank you Mike. That seems reasonable. So if I want to add additional controls to the TaskDialog, how do I do that? So far, I've got:
TaskDialog tsDialog = new TaskDialog(ultraGanttView1.ActiveTask, ultraGanttView1.CalendarInfo.Tasks, ultraGanttView1); Label taskType = new Label(); taskType.Parent = tsDialog; taskType.Text = "Expedition"; taskType.SetBounds(20, 150, 100, 25); taskType.BringToFront(); UltraTextEditor name = new UltraTextEditor(); name.Parent = tsDialog;
but those controls are not showing up on the form.
Thanks,
Myca