I am using a creation filter to change the text for the Task Bar. This is working fine with the task text = Task Name +vbcrlf + TaskStartDate + "to" + TaskStopDate
However I want to automatically re-size the bar to fit in the text. Any suggestions?
Also if I fix the Task Bar Height to say 65, the Grid Row height does not change so once again I have Tasks in the grid that do not align with the bars.
This is very unfortunate especially when showing Finish to start links as the links end up on the wrong bars an this need to be fixed or worked around
Please help...Thanks
Hi S. Kalyniuk,
Please attach an isolated sample that reproduces the behavior you've described. Please ensure that the sample references no other third party assemblies as this may contribute to the behavior you are encountering.
I look forward to hearing from you.
Hello,
I will be happy to help you out with this issue.
I have created case # CAS-101956-G0H2B0 for you to better assist you with this issue going forward. To access the case, simply log into your Infragistics account and click on My Support Activity.
Please let me know if you have further questions in this matter utilizing the case created.
Hello Jose,
Thank you for your replies.
Regarding the Bar height max, I have posted an image/screenshot that I hope demonstrates this issue in my application.
With regard to the UltraGanttViewPrintDocument, I did try setting the CreationFilter property but not to handle bar height, only bar text as per the following
Public Sub AfterCreateChildElements(parent As Infragistics.Win.UIElement) Implements Infragistics.Win.IUIElementCreationFilter.AfterCreateChildElements Dim tBUIElement As TaskBarTextUIElement = TryCast(parent, TaskBarTextUIElement) Dim sStartDateTime As String = String.Empty Dim sEndDateTime As String = String.Empty Const sTo = " to " If tBUIElement IsNot Nothing Then With tBUIElement .WrapText = True .MultiLine = True If tBUIElement.Task.IsSummary = False Then If .Task.StartDateTime.ToString IsNot DBNull.Value Then sStartDateTime = Format(.Task.StartDateTime, gcStdDateFormat) End If If .Task.EndDateTime.ToString IsNot DBNull.Value Then sEndDateTime = Format(.Task.EndDateTime, gcStdDateFormat) End If .Text = .Task.Name + vbCrLf + sStartDateTime + sTo + sEndDateTime '.Text = .Task.Name + " " + sStartDateTime + sTo + sEndDateTime End If End With End If End SubI am using this for bar height
Dim ug As UltraGrid = TryCast(ugv.[GetType]().GetField("grid", System.Reflection.BindingFlags.CreateInstance Or System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).GetValue(ugv), UltraGrid) ug.DisplayLayout.Bands(0).Override.CellMultiLine = DefaultableBoolean.[True] For Each row As UltraGridRow In ug.Rows If row.ListObject.task.Issummary = False Then row.Height = ugv.TimelineSettings.BarSettings.BarHeight End If NextCan you please help with how to use this or some other preferred technique in the Creationfilter? Thank you
Hi,
I will be happy to assist you with your questions.
To best assist you with your questions, please answer the following questions:
Regarding the Bar height max, may I ask if you can post an image/screenshot that demonstrates this issue occuring in your application?
Regarding the UltraGanttViewPrintDocument, may I ask if you tried setting the CreationFilter property (link), as you did with the GanttView?
I have got this code now:
Dim ug As UltraGrid = TryCast(ugv.[GetType]().GetField("grid", System.Reflection.BindingFlags.CreateInstance Or System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).GetValue(ugv), UltraGrid) ug.DisplayLayout.Bands(0).Override.CellMultiLine = DefaultableBoolean.[True] For Each row As UltraGridRow In ug.Rows If row.ListObject.task.Issummary = False Then row.Height = ugv.TimelineSettings.BarSettings.BarHeight End If Nextand that works reasonably well except for two issuesa) The bar height seems to have a maximum and if the bar length is shortened and the maximum bar height is exceed (whatever that is) then potentially the text will be scrolled completely out of the barb) The Bar height and row in the printed out put of the Gantt View do not appear to be adjustable. They seem to be of a fixed height. This is a real issue. Any workarounds? (Please note that the above code works for for on line ganttview but not the UltraGanttViewPrintDocument1.GanttviewPerhaps (i.e. Hopefully) there some setting in the UltraGanttViewPrintDocument1.Ganttview that I am missing. Otherwise I think this is a software issueThank you in advance for your help