We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Fetch Selected values from Scheduler

Hi,
I am using scheduler control to set reminder.
I want to save reminder details in database table.
how I fetch the details like Date,Time,Subject,Location etc from scheduler control?
Please suggest me any solution regarding this problem.

Regards,
paurnima.

6 Replies

NK Neelakandan Kannan Syncfusion Team July 20, 2015 08:58 AM UTC

Hi Paurnima,

Thank you for using Syncfusion products.

Query
how I fetch the details like Date,Time,Subject,Location etc from scheduler control?

Solution-1

If you want to get the details of the selected appointment or remainder of the particular event, you can use the SelectedAppointments property. Please make use of below code,


Code Snippet:

foreach (IScheduleAppointment appointment in this.scheduleControl1.GetScheduleHost().SelectedAppointments)

{

MessageBox.Show("Appointment Date is " + appointment.StartTime.ToLongDateString() +

"" + "Start Time is " + appointment.StartTime.ToLongTimeString() +

"" + "End Time is " + appointment.EndTime.ToLongTimeString() +

"" + "Subject is " + appointment.Subject.ToString() +

"" + "Location is " + appointment.LocationValue.ToString());

}


Solution-2
If you want to get the details of all the appointments, you can use the dataprovider which is used to generate the data of the schedule control. Please make use of below code,

Code Snippet:

if (dataProvider != null)

{

for (int i = 0; i < dataProvider.MasterList.Count; i++)

{

IScheduleAppointment appointment = dataProvider.MasterList[i];

MessageBox.Show("Appointment Date is " + appointment.StartTime.ToLongDateString() +

"" + "Start Time is " + appointment.StartTime.ToLongTimeString() +

"" + "End Time is " + appointment.EndTime.ToLongTimeString() +

"" + "Subject is " + appointment.Subject.ToString() +

"" + "Location is " + appointment.LocationValue.ToString());


}

}




Please let me know if you have any queries.

Regards,
Neelakandan


PA Paurnima July 24, 2015 05:40 AM UTC

Thank you for reply.
But I didn't find the property "SelectedAppointments)" of this.scheduleControl1.GetScheduleHost() method.
So that I could not able fetch inserted record from that schedulecontrol.
Please suggest me any other solution regarding to this .
Thank you.



Regards,
Paurnima.



NK Neelakandan Kannan Syncfusion Team July 27, 2015 04:17 AM UTC

Hi Paurnima,

Sorry for the inconvenience caused.

In order to access the properties from the GetScheduleHost(), Syncfusion.Grid.Windows.dll has to be added in your application since GetScheduleHost() is referred from this DLL. Please check whether the following DLLs are referred in your application,



Please let me know if you have any queries.

Regards,
Neelakandan


PA Paurnima July 28, 2015 07:31 AM UTC

Hi,
Thank you for previous reply.
I am adding all those references but still it doesn't work.
I am using version 10.403.0.53 and references are already added in my application.
Is there problem of version?or any other?
Please give me solution.
Thank you.

Regards,
Paurnima.




PA Paurnima July 28, 2015 09:53 AM UTC

I am adding schedulecontrol at groupBar1_GroupBarItemSelected() event .
This event adds schedulecontrol at runtime.



NK Neelakandan Kannan Syncfusion Team July 29, 2015 04:01 AM UTC

Hi Paurnima,

Thank you for your update.

We have provided the support to retrieve the selected appointments from the schedule in 12.2.0.36 version onwards. So that please migrate to our latest version to achieve your scenario with “Retrieving the selected appointments” in ScheduleControl.

Please let me know if you have any queries.

Regards,
Neelakandan

Loader.
Live Chat Icon For mobile
Up arrow icon