Home Unanswered Active Tags New Question

Bubble information

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
Asked by Owen 3 years ago.
Replies

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 Dan Letecky 3 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 Owen 3 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.

Comment posted by Dan Letecky 3 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java