This is a migrated thread and some comments may be shown as answers.

Get appointment by UniqueID property

3 Answers 185 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Jaromir
Top achievements
Rank 1
Jaromir asked on 24 Sep 2013, 08:50 AM
Hi all,
I implemented RadScheduler component into external app (Dynamics NAV) as .NET add-in. Appointments which are created inside RadScheduler component are correctly transferred to Dynamics NAV (via XML). Then I run some business logic inside Dynamics NAV in order to save these appointments into Dynamics NAV database. Everything works correctly if there are no warning or errors in Dynamics NAV. But sometimes the business logic in Dynamics NAV produces an error -> appointment in Dynamics NAV is not created and in that case I need to delete this appointment in RadScheduler component as well. And in that case it would be nice, e.g. I will be able to get appointment by UniqueID property or something like that in order to remove this appointment from RadScheduler component as well. Can you help me how can I do that? Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 27 Sep 2013, 09:50 AM
Hi Jaromir,

Thank you for contacting us.

We have an article in our help section which explains how to add a custom field to the EditAppointment dialog. This example also explains how to create a custom appointment, which should work out well in your case. The above mentioned article can be found on this address - http://www.telerik.com/help/winforms/scheduler-appointments-and-dialogs-adding-a-custom-field-to-the-editappointment-dialog.html.

I hope this information will be of help. If you have any other questions, do not hesitate to ask.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Karthik
Top achievements
Rank 1
answered on 13 May 2016, 10:30 AM

Hello,

I use Telerik Demo Sheduler as my base. I have modified data like this:

 

DataTable dtActions = SqlHelper.GetTable("base_Action_Search");//,

new string[] { "@CompanyName", client, "@TaskTypeID", db_TaskTypeID.SelectedValue.ToString() });//, "@Users", Users });

foreach (DataRow dr in dtActions.Rows)

{

SessionAppointment appointments = new SessionAppointment();

appointments.UniqueId = dr["ActionID"].ToString();

appointments.Subject = dr["ActionName"].ToString();

}

Now i want to implement deleting. But i cant access UniqueID property? How I can do that..? 

 

i use Telerik Demo Sheduler as my base

0
Hristo
Telerik team
answered on 17 May 2016, 03:30 PM
Hi Karthik,

Thank you for writing.

The UniqueId property is public and you would be able to directly access it and retrieve its value. If I understand correctly you would like to delete appointments based on that value. Please check my code snippet below: 
foreach (Appointment appointment in this.radScheduler1.Appointments)
{
    EventId id = appointment.UniqueId;
    // Perform validation.
    if (!string.IsNullOrEmpty(appointment.UniqueId.KeyValue.ToString()))
    {
        this.radScheduler1.Appointments.Remove(appointment);
    }   
}

In case you keep experiencing issues please open up a support ticket and send us a sample project.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Scheduler and Reminder
Asked by
Jaromir
Top achievements
Rank 1
Answers by
George
Telerik team
Karthik
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or