Imports System
Imports System.Data
Imports DayPilot.Web.Ui.Events
Imports DayPilot.Web.Ui.Events.Calendar

Partial Public Class CustomEventFormatting
	Inherits System.Web.UI.Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

	End Sub
	Protected Sub DayPilotCalendar1_BeforeEventRender(ByVal sender As Object, ByVal e As BeforeEventRenderEventArgs)
		If e.Tag(0) = "2" Then
			e.DurationBarColor = "red"
			e.DurationBarBackColor = "#eee"
			e.BackgroundColor = "lightyellow"
			e.Html = "<i>WARNING: This is an unusual event.</i><br>" & e.Html & "<br/>" & e.Tag("name")
		End If

		If e.Id = "1" Then
			e.Html = "test"
			e.Visible = False
		End If
	End Sub
End Class
