Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to replace a default SchedulerControl's command with a custom one

$
0
0

This example illustrates the technique used to modify the functionality of existing SchedulerControl commands.
The SchedulerControl exposes the ISchedulerCommandFactoryService interface that enables you to substitute the default command with your own custom command. 

First, create a custom command class inherited from the command that you wish to replace. Override the required methods of the command. Then, create a class that implements the ISchedulerCommandFactoryService interface. In this class, you need to implement the CreateCommand method to create an instance of a custom command class. An identifier of the currently processed command is passed as a parameter of this method.

Finally, use the custom class that implements the ISchedulerCommandFactoryService interface to substitute the default command service. In this case, instead of the default command, the command you implemented will be used by the SchedulerControl.

For demonstration purposes, the default SplitAppointmentOperationCommand command is replaced with a custom command in this example. The default SplitAppointmentOperationCommand command is extended with the SplitAppointmentCommandStep property to define a fixed split operation's step.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>