Hi,
I want to display a tooltip with information about the task when the user rolls over a task in the grid. How would I go about doing so?
Thanks
Hello clgroce,
I believe that this functionality is by default handled by the WinGanttView control. Isnt it? Or you might want to customize this tooltip? You could use our 'UltraToolTipManager' component, check if the UI element, in 'MouseEnterElement' is a TaskUIElement, if so show the tooltip, else hide it.
Please do not hesitate to ask if something comes up.
As far as I can tell, the cotrol only handles the tool tip for a task bar in the chart. I want a tool tip for when the mouse rolls over a task in the grid on the left. I tried using the ultratooltipmanager, and I checked whether or not the element is a taskuielement and if it is then showToolTip, but I can't seem to get that to work either.
Hi Boris,
I resolved the issue, thanks for your help! On another note, I posted to this forum (http://beta.infragistics.com/community/forums/p/39851/225227.aspx#225227) a while back and have yet to receive a response... I'm looking for a way to have a dotted line to show the current time.
Thanks Again!
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
I guess I got your requirements wrong. Please try the following code:
private void ultraGanttView1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) { if (e.Element is EditorWithTextDisplayTextUIElement && e.Element.Parent.Parent is CellUIElement) { CellUIElement cell = (CellUIElement)e.Element.Parent.Parent; foreach (Task task in ultraCalendarInfo1.Tasks) { if (task.Name == cell.Row.Cells["Name"].Value.ToString()) { currentTask = task; } } EditorWithTextDisplayTextUIElement editor = (EditorWithTextDisplayTextUIElement)e.Element; info.ToolTipText = "CUSTOM TOOLTIP: "+currentTask.Duration.ToString(); //This is just for test ultraToolTipManager1.SetUltraToolTip(ultraGanttView1, info); ultraToolTipManager1.ShowToolTip(ultraGanttView1); } else ultraToolTipManager1.HideToolTip(); }
currentTask is a 'Task' object - "Task currentTask;".
Let me know if you have any questions please.
Is there no way to actually access the Infragistics.Win.UltraWinSchedule.Task object associated with a given row in the grid?
I could modify your code as follows:
private void ultraGanttView1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) { if (e.Element is EditorWithTextDisplayTextUIElement && e.Element.Parent.Parent is CellUIElement) { CellUIElement cell = (CellUIElement)e.Element.Parent.Parent; EditorWithTextDisplayTextUIElement editor = (EditorWithTextDisplayTextUIElement)e.Element; info.ToolTipText = "CUSTOM TOOLTIP: " + cell.Row.Cells["Name"].Value.ToString(); ultraToolTipManager1.SetUltraToolTip(ultraGanttView1, info); ultraToolTipManager1.ShowToolTip(ultraGanttView1); } else ultraToolTipManager1.HideToolTip(); }
Please feel free to let me know if a question about our toolset comes up on your mind.