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

Display Popup with custom text in "header" of DayPilot Control

Asked by Dave
3 years ago.

Hi Dan and Team,

Please would you recommend a method whereby the bubble can be applied to the header of the daypilotcontrol..

I have some information in an object which I would like to display in a popup box when the user clicks on one of the header items - specifically the first column..

Thanks

MrPlatypus a.k.a. Dave

Comment posted by mrplatypus
3 years ago.

I have found one solution: To use the tool tip of the control...

I have a found a possible more elegant solution, to use DayPilot "Bubble" control..

Is it possible to have more than one bubble control assigned to a daypilot scheduler control?

Answer posted by Dan Letecky [DayPilot]
3 years ago.

You can assign just one default bubble for each of the object types (BubbleEvent, BubbleCell, BubbleResource).

You can also invoke the bubble manually using JavaScript like this:

DayPilotBubble control:

<DayPilot:DayPilotBubble
  ...
  ClientObjectName="myBubble"
/>

Bubble activation:

myBubble.showHtml("my HTML", div);

Where "div" is an optional reference DOM element (used for positioning the bubble). If you don't specify it the bubble will be displayed at the current mouse position.

Comment posted by mrplatypus
3 years ago.

Ahhh... So, there isn't a special bubble which can be applied to the rowheader as well as having bubbles on the same row?

Comment posted by mrplatypus
3 years ago.

To continue: In that I couldn't have two hover events for items within the grid, be that cell or header?

Comment posted by Dan Letecky [DayPilot]
3 years ago.

I'm not sure if I understand correctly - let me describe how it works:

1. The bubble object serves as a template. It defines the appearance (CSS, popup effects, etc.) and handles the dynamic HTML requests. In most cases you will want all bubbles to have the same appearance so you can reuse the bubble object.

2. There are three properties in the Scheduler that will let you enable the bubble for the respective objects (BubbleEvent, BubbleCell, BubbleResource). You can assign the same DayPilotBubble to all these properties. The main reason why these properties are separate is that assigning a bubble object to one of them enables the bubble for the object type. If the property is null, the bubble is not enabled for that object type.

3. You can also add a special active area to events with action set to "Bubble". This only works for events (not row headers and cells) at the moment. This will let you specify an icon inside the event box that will trigger the bubble. If you set EventHoverHandling to "Disabled" this will let you display the bubble when hovering the icon (rather than the whole event box).

In addition to that, you can display the bubble manually using JavaScript when needed (see the .showHtml() call example above).

The bubble is designed to work primarily with "hover" events. It stays displayed for a limited time - as soon as you move the mouse outside of the source or outside of the bubble itself, it disappears. There is an option to make it stay visible (HideAfter="0") but that doesn't make it a modal dialog.

If you need to display a modal dialog, you may also want to take a look at DayPilot.Modal - http://code.daypilot.org/81367/daypilot-modal. This is a true modal dialog that will allow you to display interactive content inside.

Comment posted by mrplatypus
3 years ago.

Dan,

Thanks for your reply..

Apologies for not being clear enough, allow me to try to be clear now..

Further to my original point, please see Issue 1 (below). Investigations have raised two other issues, along the same lines (Issue 2 and Issue 3)...

Issue 1: I would like to have two bubble popups - one for the row header and for each event..
The only difference would be the content...

a) I have a daypilotscheduler control...
b) With several rows of cells in ..
c) I would like for the rowheader to have a bubble with one set of content and each event of the same row to have its own content... clear?

Issue 2:
I have looked in the daypilotscheduler that I have and the three properties that you mention don't seem to appear in the intellisense for the control...

Issue 3:
I have also looked in the DayPilotTrial sampler solution to find references to the

DayPilotBubble1_RenderContent(object sender, RenderEventArgs e)
 which has three clauses within:
        if (e is RenderEventBubbleEventArgs)
        else if (e is RenderTimeBubbleEventArgs)
        else if (e is RenderCellBubbleEventArgs)

I've also defined three separate methods to handle each of the events of the bubble control..
Which is the preferred practice to be using - seperate methods or to use the rendercontent method?

Please advise.

Thanks

Dave

Comment posted by mrplatypus
3 years ago.

Dan: I can see a work around, albeit not using the second bubble:

1) in the header, to use the ToolTip feature to provide one set of information
2) for me to leave the current use of bubble to define the second set of data..

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