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

persisting changes of custom appointments to database

1 Answer 65 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
aat jan van Kranenburg
Top achievements
Rank 1
aat jan van Kranenburg asked on 22 Jan 2013, 07:48 AM
Hi, after a couple of years absence i'm evaluating the Radscheduler again. Despite of the help of this forum i cannot get a situation working. Very important to get it done on time, because a customer expects a demo.

what is the situation?
In fact perfect described by this post:-
http://www.telerik.com/community/forums/winforms/scheduler/currently-selected-appointment.aspx

i added an Id as a property.

My question: how to get the id of the changed appointment?

thanks for your help!

Best regards.
Aat Jan

1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 24 Jan 2013, 11:14 AM
Hi Aat,

Thank you for writing.

I am not sure I completely understand your scenario and I am not sure where you have added your ID property. In case you are using a data source, you can try using the DataItem property which holds a reference to the corresponding item from the data source. In case you are using custom appointment with an ID property added, you can just cast the appointment to your custom type:
this.radScheduler1.Appointments.CollectionChanged += new Telerik.WinControls.Data.NotifyCollectionChangedEventHandler(Appointments_CollectionChanged);
 
void Appointments_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
{
    if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.ItemChanged)
    {
        IEvent appointment = (IEvent)e.NewItems[0];
        int id = ((MyDataRowType)appointment.DataItem).ID;
        //OR
        int id = ((MyAppointmentType)appointment).ID;
    }
}

If this is not what you need, please provide more detailed explanation of your requirements and your current implementation. You can also include some code snippets which will let me understand your case better.

Off topic, can you please let me know which version of RadControls for WinForms are you using, since you account shows a trial download from back in 2010.

Please let me know if you need further help.

Kind regards,
Ivan Todorov
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
Scheduler and Reminder
Asked by
aat jan van Kranenburg
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or