search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Code Example for ResourceBubbleID

Asked by John
13 years ago.


Any sample code for using the ResourceBubbleID?

I'd like to setthem the same time as the Resouces.

reader = comm.ExecuteReader
While reader.Read
DayPilotScheduler1.Resources.Add(reader.Item("fldCar").ToString & " " & reader.Item("fldRegistration").ToString, reader.Item("fldCarID").ToString)
'DayPilotScheduler1.ResourceBubbleID = reader.Item("fldCarNotes").ToString ??????????????????
End While

Catch ex As Exception

Comment posted by John
13 years ago.

Hi, Just in case any one needs this...

1. You need to add a DayPilotBubble control
<DayPilot:DayPilotBubble ID="DayPilotBubble2" runat="server" ClientObjectName="rbubble"/>

2. You need to add a reference to this control in the DayPilotScheduler

3. Add code similar to below to actually enter the content of the Bubble

Private Sub DayPilotBubble2_RenderContent(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.Bubble.RenderEventArgs) Handles DayPilotBubble2.RenderContent

'You need to Cast the Args of the sub so you can pick up the resource ID
Dim re As DayPilot.Web.Ui.Events.Bubble.RenderResourceBubbleEventArgs
re = CType(e, DayPilot.Web.Ui.Events.Bubble.RenderResourceBubbleEventArgs)

'Now use re.ResourceId with your Database connection or whatever to find the info you need
'eg do a select to find moreinfo based on ID of resource = re.ResourceId and feed the result into the innerHTML

e.InnerHTML = "Vehicle:<b>" & reader.Item("fldVehicle").ToString & "</b>"
End Sub

Hope that helps

Comment posted by Dan Letecky
13 years ago.
John, Thanks for posting the answer!
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.