This is a migrated thread and some comments may be shown as answers.

Show date time info while dragging the task

1 Answer 46 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Damon
Top achievements
Rank 1
Damon asked on 27 May 2016, 04:45 AM
Is it possible to show date time info while dragging the task?

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 27 May 2016, 03:12 PM
Hi Damon,

Thank you for writing.

You can associate a screen tip element for each of the tasks. For the purpose, you would need to subscribe RadGanttView to the ScreenTipNeeded event. Please check my code snippet below: 
RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement();
Size size = new Size(120, 70);
Padding pad = new Padding(2);
private void radGanttView1_ScreenTipNeeded(object sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
{
    GanttViewTaskElement task = e.Item as GanttViewTaskElement;
    if (task != null)
    {
        e.Delay = 1;
 
        screenTip.MainTextLabel.Padding = pad;
        screenTip.MainTextLabel.Text = "This is " + task.Text;
        screenTip.MainTextLabel.Margin = new System.Windows.Forms.Padding(10);
        screenTip.CaptionLabel.Padding = pad;
        screenTip.EnableCustomSize = true;
        screenTip.AutoSize = false;
        screenTip.Size = size;
 
        task.ScreenTip = this.screenTip;
    }
}

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Tags
GanttView
Asked by
Damon
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or