Skip to content

IsEditOperationDisabled Event

Description

Occurs each time an edit operation is possible and can be used to determine or disable different edit operations.

Syntax

Public Event IsEditOperationDisabled( _
    ByVal OpParams As CalendarEditOperationParameters, _
    ByRef bDisableOperation As Boolean _
)

Parameters

  • OpParams [in]
    Pointer to a CalendarEditOperationParameters object that contains the edit operation that can be performed, the event(s) set for the edit operation, etc.

  • bDisableOperation
    A Boolean value that indicates whether the operation should be disabled.

Remarks

The IsEditOperationDisabled event occurs each time an edit operation is possible and can be used to determine or disable different edit operations. The OpParams.Operation property holds the edit operation that is currently possible or the edit operation that was just performed.

This IsEditOperationDisabled event may be fired several times before the actual edit operation. This is done to update the user interface state (set corresponding mouse cursor, for example). The BeforeEditOperation will only be fired once before the edit operation.

Example

This sample illustrates how to use the IsEditOperationDisabled event to check if a specific edit operation is disabled. This code ensures that in-place event creation is disabled.

private void CalendarControl_IsEditOperationDisabled(object sender, AxXtremeCalendarControl._DCalendarControlEvents_IsEditOperationDisabledEvent e)  
{  
    System.Diagnostics.Debug.WriteLine("Edit operation disabled: " + (CalendarEditOperation)e.opParams.Operation);  
    if ((CalendarEditOperation)e.opParams.Operation == CalendarEditOperation.xtpCalendarEO_InPlaceCreateEvent)  
    {  
        if (CalendarControl.Options.EnableInPlaceCreateEvent)  
        {  
            e.disableOperation = true;  
        }  
    }  
}

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.