Hi,
I'd like to modify ToolTip information in TimeLine. Instead showing Duration I'd like to show a custom column from task.
Is it possible ?
I've found event TaskToolTipDisplaying, but I can't change ToolTipText.
I create new instance of toolTip but I have to reset all value from the original e.ToolTip. There is a way to modify just the text without cloning with reflection the original one ?
Thanks for the feedback. About your question - it is developer's decision.
Let me know if you have any further questions.
So simple ... I'm ashamed ...
But why can't we modify directly on e.ToolTipInfo?
There are different approaches to solve this task, but the easiest way is through TaskToolTipDisplaying event. Maybe you could try the code below:
private void ultraGanttView1_TaskToolTipDisplaying(object sender, Infragistics.Win.UltraWinGanttView.TaskToolTipDisplayingEventArgs e)
{
ToolTipInfo info = e.ToolTipInfo;
info.DisplayStyle = ToolTipDisplayStyle.BalloonTip;
info.ToolTipText = "My custom information" + Environment.NewLine + "Second row of information"; //e.Task.Resources.ToString();
info.ToolTipText += Environment.NewLine + "My start date "+ e.Task.StartDateTime.ToShortDateString();
info.ToolTipText += Environment.NewLine + "My custom column data:" + e.Task.GetCustomProperty("Key of my custom column");
e.ToolTipInfo = info;
}
Let me know if you have any questions.