Summary:

  • UpdateWithMessage() on the server side
  • MessageHideAfter
  • Style it using CSS (supported in the theme designer)

scheduler-message-bar.png 

The message bar can be updated easily using a single line of code and without any JavaScript on the client side. Use the UpdateWithMessage() method:

  • UpdateWithMessage(string message)

The message bar invoked using UpdateWithMessage() method is visible for 5 seconds.

  • If there is a new message during that time, the message bar fades out and in to give a visual feedback.
  • It can be closed by clicking anywhere on the message bar.

Hover

Message bar close timeout (see MessageHideAfter property) will be paused when you hold the mouse cursor over the message bar. The message bar will be hidden in 500ms after you move the mouse out.

MessageHideAfter

The MessageHideAfter property sets the default timeout for message bar hiding (in ms). The default value is 5000 (5 seconds).

Position

scheduler-html5-javascript-jquery-message.png

The message bar position can be set using MessageBarPosition property ("Top", "Bottom"). The default position is "Top".

ASP.NET WebForms

Default.aspx.cs

protected void DayPilotScheduler1_EventResize(object sender, EventResizeEventArgs e)
{
  // ...
  DayPilotScheduler1.UpdateWithMessage("Event resized");
}

calendar-message-bar.png

The message bar now can be updated easily using a single line of code and without any JavaScript on the client side.

You can use a new UpdateWithMessage() method:

  • UpdateWithMessage(string message)

Default.aspx.cs

protected void DayPilotCalendar1_EventResize(object sender, EventResizeEventArgs e)
{
  // ...
  DayPilotCalendar1.UpdateWithMessage("Event resized");
}

ASP.NET MVC

The Scheduler supports an integrated message bar.

scheduler-message-bar.png

You can display a message using a server-side UpdateWithMessage() method:

protected override void OnInit(InitArgs ea)
{
  UpdateWithMessage("Welcome!", CallBackUpdateType.Full);
}

Demo

JavaScript

You can use a client-side message() method:

dps.messageBarPosition = "Bottom";
dps.message("Welcome!");