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

Bubble information

Asked by Owen
15 years ago.
Hi, I am trying to use the Bubble to display extra information about a booking that is stored in the DB. To get at this data, I need to have the ID of the 'booking', which in theory should be stored with the event on the calendar, however I can't work out how to get to it. Is there a simple way of doing this, or would I have to create my own storage object on the page when the events are rendered to match up the event ID to the DB ID? Thanks in advance, Owen
Comment posted by Dan Letecky
15 years ago.

The event ID is accessible in DayPilotBubble.RenderContent after casting the EventArgs toRenderEventBubbleEventArgs (re.Value):

    protected void DayPilotBubble1_RenderContent(object sender, RenderEventArgs e)
    {
        if (e is RenderEventBubbleEventArgs)
        {
            RenderEventBubbleEventArgs re = e as RenderEventBubbleEventArgs;
            re.InnerHTML = loadDetailsForId(re.Value);
        }
    }

See also Demo/Calendar/Default.aspx.cs for an example.

Comment posted by Owen
15 years ago.
Hi Dan, Thanks for the reply. I can get the eventID no problem, it is trying to associate this ID with any other information in the event (title, comments, start/end time etc) I guess my question is; is there an easy way to do this? Thanks, Owen
Comment posted by Dan Letecky
15 years ago.

At this moment you have to store it in your own object or query the DB.

I plan to send all the event details (including start, end, name, tags...) to the bubble RenderContent event so you don't need to load it again. This could be available in release 5.2.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.