Hello, Sina,
In order to change the culture of the start/end
RadDateTimePicker controls in the print settings dialog, you can
use a custom
SchedulerPrintSettingsDialog and override its
OnLoad method where you can specify the desired culture. For this purpose it is necessary to create a custom
SchedulerPrintSettingsDialogFactory as follows:
public
RadForm1()
{
InitializeComponent();
this
.radScheduler1.PrintSettingsDialogFactory =
new
CustomSchedulerPrintSettingsDialogFactory();
}
private
void
radButton1_Click(
object
sender, EventArgs e)
{
this
.radScheduler1.PrintPreview();
}
public
class
CustomSchedulerPrintSettingsDialogFactory : IPrintSettingsDialogFactory
{
public
Form CreateDialog(RadPrintDocument document)
{
return
new
CustomSchedulerPrintSettingsDialog(document);
}
}
public
class
CustomSchedulerPrintSettingsDialog : SchedulerPrintSettingsDialog
{
public
CustomSchedulerPrintSettingsDialog(RadPrintDocument document) :
base
(document)
{
}
SchedulerPrintStyleSettings printStyleSettingControl;
protected
override
Control CreateFormatControl()
{
printStyleSettingControl =
base
.CreateFormatControl()
as
SchedulerPrintStyleSettings;
return
printStyleSettingControl;
}
protected
override
void
OnLoad(EventArgs e)
{
base
.OnLoad(e);
RadDateTimePicker startDTP = printStyleSettingControl.Controls[
"groupBoxPageRange"
].Controls[
"datePickerStartDate"
]
as
RadDateTimePicker;
startDTP.Culture =
new
System.Globalization.CultureInfo(
"bg-BG"
);
RadDateTimePicker endDTP = printStyleSettingControl.Controls[
"groupBoxPageRange"
].Controls[
"datePickerEndDate"
]
as
RadDateTimePicker;
endDTP.Culture =
new
System.Globalization.CultureInfo(
"bg-BG"
);
}
}
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik