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.
Unfortunately, activation email could not send to your email. Please try again.

Fetch Selected values from Scheduler

Thread ID:

Created:

Updated:

Platform:

Replies:

119656 Jul 18,2015 04:54 AM Jul 29,2015 12:01 AM Windows Forms 6
loading
Tags: ScheduleControl
Paurnima
Asked On July 18, 2015 04:54 AM

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.

Neelakandan Kannan [Syncfusion]
Replied On July 20, 2015 04:58 AM

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() +

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

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

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

"\n" + "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() +

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

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

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

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


}

}




Please let me know if you have any queries.

Regards,
Neelakandan

Paurnima
Replied On July 24, 2015 01:40 AM

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.


Neelakandan Kannan [Syncfusion]
Replied On July 27, 2015 12:17 AM

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

Paurnima
Replied On July 28, 2015 03:31 AM

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.



Paurnima
Replied On July 28, 2015 05:53 AM

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


Neelakandan Kannan [Syncfusion]
Replied On July 29, 2015 12:01 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;