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
1370
How to personalize ToolTip in TimeLine ?
posted

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 ? 

Parents
No Data
Reply
  • 53790
    Verified Answer
    posted

    Hi,

    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.

Children