Click or drag to resize
KaxSchedulerOnClientTimeSlotContextMenu Property
Gets or sets a value indicating the client-side event handler that is called when an empty time slot has been right-clicked.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public string OnClientTimeSlotContextMenu { get; set; }

Property Value

Type: String
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
Remarks

If specified, the OnClientAppointmentContextMenu client-side event handler is called when an empty time slot has been right-clicked. Two parameters are passed to the handler:

  • sender, the scheduler client object;
  • eventArgs with four properties:
    • get_targetSlot(), the target slot.
    • get_time(), the time that corresponds to the slot.
    • get_isAllDay(), a boolean indicating if this is an all-day slot (the time should be discarded in this case).
    • get_domEvent(), the original DOM event.

This event cannot be cancelled.

Examples

<script type="text/javascript">
function onClientTimeSlotContextMenuHandler(sender, eventArgs)
{
var time = eventArgs.get_time();
// ...
eventArgs.get_domEvent().preventDefault(); // Prevent displaying the browser menu
}
</script>

<kettic:KaxScheduler ID="KaxScheduler1"
runat="server"
OnClientTimeSlotContextMenu="onClientTimeSlotContextMenuHandler">
....
</kettic:KaxScheduler>

See Also