![]() |
|
GTP.NET FAQ 10098When connected to a database: how can I change the color of different TimeItems individually? Please note that this article
refers to the GTP.NET Jump to article- 2007-12-06 07:05:00 - Email plexityHide Question When connected to a database: how can I change the color of different TimeItems individually (for instance: same resources the same color)? Answer Good question, how do you manage to set specific properties to data that is added automatically with databind. For time items you willl find a TimeItemDataConnect for each layer. It is the TimeItemDataConnect object that resolves the events in the datasource to actual time item property values. You can implement the TimeItemDataConnect.OnBeforeDSToTimeItem (the event is not available in the property grid but just type yourLayer.TimeItemDataConnect.OnBeforeDSToTimeItem+= and hit tab in VS) In this event you can inspect that data from the datarow and you can do additional things on your time item, like setting a TimeItemLayout etc. This event is also good for conversions, if your datarow has start and length instead of start and stop. New: Now there is an easier way to intercept what happens each time the TimeItem is updated from the datasource: OnEachListItemWhenDataBound_TimeItem In the sample below we use it to add TimeItemTexts: /// <summary> tit=new TimeItemText();
|
"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%" |
| ? 1999-2006 PlexityHide.com Grastensvagen 24, S-163 45 Spanga Sweden E-mail: support@plexityhide.com |