How to show the different color for the different kind of activity
Asked by Rose 13 years ago.
Hello ,
I used daypilot month with sqlDatasource (ASP,Net C#) I have different kind of activity's status as Started , Closed and Canceled. I want to set activities which the status are Started with Green color and , Closed with Blue color and Canceled with Orange. But I dont know how to do it. Please provide me the guideline or suggestion.
It assumes that the status is in "status" field of the data set returned by the SqlDataSource.
Comment posted by Rose 13 years ago.
Appreciated for your kindly help. Thanks s much
Answer posted by Sascha Basinski 13 years ago.
Hello!
I have a timeline with events per Month (Monthly view is selected by startdate with a Combobox)
I have done this example and at start it works and my events were coloured, but...
when I change the month from one to another I get this error :
System.ArgumentNullException: The Value can not be Null. Parametername: container
Why?
Thanks Sascha
Comment posted by Sascha Basinski 13 years ago.
Sorry... here is my code...
Private Sub DayPilotScheduler1_BeforeEventRender(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.Scheduler.BeforeEventRenderEventArgs) Handles DayPilotScheduler1.BeforeEventRender
If e.DataItem.Item("EventID") = "K" Then e.BackgroundColor = "LightPink"
If e.DataItem.Item("EventID") = "U" Then e.BackgroundColor = "LightGreen"
If e.DataItem.Item("EventID") = "UH" Then e.BackgroundColor = "LightGreen"
End Sub
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.