10614 : Is it possible to use a TimeItemStyle of User in GTP.WEB?


Is it possible to use a TimeItemStyle of ‘User’ in GTP.WEB? If so, how do we specify how to draw the item?


Yes. The Gantt_ASP uses the windows forms gantt for rendering. So implement the event found here:


This event can be implemented like this in c#:


.Gantt_ASP.Gantt.OnTimeItem_UserDraw += new PlexityHide.GTP.TimeItemEvent(this.impl_OnTimeItem_UserDraw);

In VB.NET you use the AddHandler call to assign a delegate in runtime, like this:

Add a method:


Sub impl_OnTimeItem_UserDraw(ByVal aGantt As PlexityHide.GTP.Gantt, ByVal e As PlexityHide.GTP.TimeItemEventArgs)

Then you bind to this method like this:

AddHandler this.Gantt_ASP.Gantt.OnTimeItem_UserDraw, AddressOf impl_OnTimeItem_UserDraw

IMPORTANT: TimeItem.TimeItemLayout.TimeItemStyle must be set to User. Otherwise the user draw event is not called…< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />