persisting changes of custom appointments to database

2 posts, 0 answers
  1. aat jan van Kranenburg
    aat jan van Kranenburg avatar
    9 posts
    Member since:
    Aug 2004

    Posted 22 Jan 2013 Link to this post

    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
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 24 Jan 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top