Category / Section
How to change or localize the "Double Click to add All Day Event" like default strings in ScheduleControl?
3 mins read
You can change or localize the default strings such as, Double Click to add new event displayed in DayView of ScheduleControl by using the DisplayStrings static property of ScheduleGrid class that is an array string property having default strings in its collection.
C#
//Specify the corresponding array index for string that has to be changed/localized
//4-Double click to add all day event.
ScheduleGrid.DisplayStrings[4] = "The Localized string";
VB
'Specify the corresponding array index for string that has to be changed/localized
'4-Double click to add all day event
ScheduleGrid.DisplayStrings(4) = "The Localized string"
Note: The following is the definition for DisplayStrings array. You can specify the array index for default strings that has to be localized or changed.
C#
public static string[] DisplayStrings = new string[]
{
"no closing delimiter error",
"(none)",
"Week starting ",
"Starting ",
" Double Click to Add All Day Event",
"To ",
"From ",
"Remove this appointment?",
"Remove Appointment"
};
private const int _no_closing_delimiter_error = 0;
private const int _none = 1;
private const int _week_starting = 2;
private const int _starting = 3;
private const int _Double_Click_to_Add_All_Day_Event = 4;
private const int _To = 5;
private const int _From = 6;
private const int _Remove_this_appointment = 7;
private const int _Remove_Appointment = 8;
VB
Public Shared DisplayStrings As String() = New String() {
"no closing delimiter error",
"(none)",
"Week starting ",
"Starting ",
" Double Click to Add All Day Event",
"To ",
"From ",
"Remove this appointment?",
"Remove Appointment"
}
Private Const _no_closing_delimiter_error As Integer = 0
Private Const _none As Integer = 1
Private Const _week_starting As Integer = 2
Private Const _starting As Integer = 3
Private Const _Double_Click_to_Add_All_Day_Event As Integer = 4
Private Const _To As Integer = 5
Private Const _From As Integer = 6
Private Const _Remove_this_appointment As Integer = 7
Private Const _Remove_Appointment As Integer = 8
Before
localization, as shown in the screenshot below
Figure 1: Default display string in DayView
After localization, as shown in the screenshot below
Figure 2: Localized/changed display string in DayView
Sample Links:
C#: Display_String_Localization_CS
VB: Display_String_Localization_VB