It is not possible with UpdateWithMessage()
but you can use Update()
to send custom data to the client and display the message bar using JavaScript using a custom CSS class.
Hashtable ht = new Hashtable();
ht["message"] = "Hi there";
ht["cssClass"] = "red-message";
DayPilotScheduler1.Update(ht);
You need to define an AfterRenderJavaScript
event handler:
<DayPilot:DayPilotScheduler id="DayPilotScheduler1" runat="server"
...
AfterRenderJavaScript="afterRender(data);"
ClientObjectName="scheduler"
></DayPilot:DayPilotScheduler>
And the JavaScript function which will display the message using the message() method:
<script>
function afterRender(data) {
if (data && data.message) {
scheduler.message(data.message, {cssClass: data.cssClass});
}
}
</script>
And of course, you need to define the CSS class:
.red-message {
background-color: red;
}