Automatically create schedule entries
Is it possible to programatically create entries in the schedule control using vb.net 2019.
Could you kindly point me to some sample code.
Thank in anticipation.
Alain.
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
BT
Balamurugan Thirumalaikumar
Syncfusion Team
August 17, 2020 11:47 AM UTC
Hi, Alain,
Thank you for contacting Syncfusion support,
All the appointments in ScheduleControl will be maintained in the MasterList collection and we can programmatically add (appointments) entries using vb.net. We have generated a simple sample as per your request, and please use the following example code.
Thank you for contacting Syncfusion support,
All the appointments in ScheduleControl will be maintained in the MasterList collection and we can programmatically add (appointments) entries using vb.net. We have generated a simple sample as per your request, and please use the following example code.
|
//For creating entries
Dim item As IScheduleAppointment = scheduleProvider.NewScheduleAppointment()
item.StartTime = DateTime.Now
item.EndTime = DateTime.Now.AddHours(10)
item.Subject = "Test appointment"
<Include the code to add the appointment in master list> |
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Schedule_WF.VB1239276897.zip
Thanks & Regards,
Balamurugan Thirumalaikumar
Marked as answer
AL
Alain
August 18, 2020 05:30 AM UTC
Thank you very sir for your prompt response it is greatly appreciated.
Alain.
By the same token is it possible to grammatically remove entries from a calendar>
Kind Regards.
Alain.
AR
Arulpriya Ramalingam
Syncfusion Team
August 20, 2020 02:22 AM UTC
Hi Alain,
Thanks for the update,
The MasterList collection is derived from IEnumerable interface and all the actions (Add,Remove,RemoveAt,Count,etc,.) of Enumerable collections can be done in MasterList collection also. Please refer to the following code snippet(VB) to remove the appointment.
|
// To add or remove the appointments in MasterList
scheduleProvider.MasterList.Add(item)
scheduleProvider.MasterList.Remove (item)
Me.scheduleControl1.DataSource = scheduleProvider
Me.scheduleControl1.Refresh() |
Regards,
Arulpriya
AL
Alain
August 20, 2020 05:53 AM UTC
Hello Arulpriya ,
Thank you so much, for your prompt response.
Kind Regards.
Alain.
AR
Arulpriya Ramalingam
Syncfusion Team
August 24, 2020 01:51 AM UTC
Hi Alain,
Thank you for the update and we are glad that the provided solution resolved your requirement. Please get back to us, if you need any further assistance.
Regards,
Arulpriya
SIGN IN To post a reply.