How to customize Print Settings Dialog in RadScheduler
Environment
Product Version | Product | Author |
---|---|---|
2019.3.1022 | RadSheduler for WinForms | Nadya Karaivanova |
Description
A common requirement is to customize the default look and feel of the Print Settings dialog which is displayed when Print Preview is chosen. In this tutorial it is demonstrated how to change the value of start and end date in the Print range section. Note, that this tutorial is just a sample example. Feel free to modify and extend it in a way that suits your custom requirements best.
Solution
To achieve this you should create a custom SchedulerPrintSettingsDialog and modify the specified section. RadScheduler uses IPrintSettingsDialogFactory interface that requires only CreateDialog method's implementation. This factory is very useful just when you need to create a custom dialog. You should override its CreateDialog method in order to return the new custom dialog class. Do not forget to apply this factory to your RadScheduler in the constructor of the form.
After the implementation of the IPrintSettingsDialogFactory interface is ready it is neccessary to create the custom dialog that inherits from the SchedulerPrintSettingsDialog class. The start/end date in Print range dialog are represented via the RadDateTimePicker contol. In the OnLoad method you can access the RadDateTimePicker controls and set their values to some custom instead of the default ones: