@@ -118,6 +118,8 @@ range.Start = DateTime.Now;
118
118
range .EventDuration = TimeSpan .FromMinutes (30 );
119
119
range .MaxOccurrences = 3 ;
120
120
RecurrenceDay recurrenceDay = RecurrenceDay .Wednesday ;
121
+ // To set multiple recurrence days, a bitwise mask should be used
122
+ // RecurrenceDay recurrenceDay = RecurrenceDay.Monday | RecurrenceDay.Wednesday | RecurrenceDay.Friday;
121
123
recurrenceEditor .RecurrenceRule = new WeeklyRecurrenceRule (interval , recurrenceDay , range );
122
124
// DayOfWeek startDayOfWeek = DayOfWeek.Tuesday;
123
125
// recurrenceEditor.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range, startDayOfWeek);
@@ -132,6 +134,8 @@ range.Start = DateTime.Now
132
134
range.EventDuration = TimeSpan.FromMinutes( 30 )
133
135
range.MaxOccurrences = 3
134
136
Dim recurrenceDay As RecurrenceDay = RecurrenceDay.Wednesday
137
+ 'To set multiple recurrence days, a bitwise mask should be used
138
+ 'Dim recurrenceDay As RecurrenceDay = RecurrenceDay.Monday Or RecurrenceDay.Wednesday Or RecurrenceDay.Friday
135
139
recurrenceEditor.RecurrenceRule = New WeeklyRecurrenceRule(interval, recurrenceDay, range)
136
140
'DayOfWeek startDayOfWeek = DayOfWeek.Tuesday;
137
141
'recurrenceEditor.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range, startDayOfWeek);
@@ -205,52 +209,6 @@ recurrenceEditor.RecurrenceRule = New YearlyRecurrenceRule(month, dayOrdinal, ra
205
209
````
206
210
207
211
208
- The recurrence rule can be created and directly added as a property of an Appointment as shown in the code:
209
-
210
-
211
-
212
- ```` C#
213
- protected void RadButton1_Click (object sender , EventArgs e )
214
- {
215
- Appointment newAppointment = new Appointment ();
216
- newAppointment .Subject = RadTextBox1 .Text ;
217
- newAppointment .Start = DateTime .Now ;
218
- newAppointment .End = DateTime .Now .Add (TimeSpan .FromHours (1 ));
219
- int interval = 1 ;
220
- RecurrenceRange range = new RecurrenceRange ();
221
- range .Start = newAppointment .Start ;
222
- range .EventDuration = newAppointment .End - newAppointment .Start ;
223
- range .MaxOccurrences = 3 ;
224
- RecurrenceRule newDayly = new DailyRecurrenceRule (interval , range );
225
- newAppointment .RecurrenceRule = newDayly .ToString ();
226
-
227
- RadScheduler1 .InsertAppointment (newAppointment );
228
- RadScheduler1 .Rebind ();
229
- }
230
- ````
231
- ```` VB.NET
232
-
233
-
234
- Protected Sub RadButton1_Click( ByVal sender As Object , ByVal e As EventArgs)
235
- Dim newAppointment As New Appointment()
236
- newAppointment.Subject = RadTextBox1.Text
237
- newAppointment.Start = DateTime.Now
238
- newAppointment.[End] = DateTime.Now.Add(TimeSpan.FromHours( 1 ))
239
- Dim interval As Integer = 1
240
- Dim range As New RecurrenceRange()
241
- range.Start = newAppointment.Start
242
- range.EventDuration = newAppointment.[End] - newAppointment.Start
243
- range.MaxOccurrences = 3
244
- Dim newDayly As RecurrenceRule = New DailyRecurrenceRule(interval, range)
245
- newAppointment.RecurrenceRule = newDayly.ToString()
246
-
247
- RadScheduler1.InsertAppointment(newAppointment)
248
- RadScheduler1.Rebind()
249
- End Sub
250
-
251
- ````
252
-
253
-
254
212
## The recurrence rule can be created and directly added as a property of an Appointment as shown in the code:
255
213
256
214
0 commit comments