Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > How to Bind Selected Appointment

Not answered How to Bind Selected Appointment

Feed from this thread
  • kaka avatar

    Posted on Oct 28, 2010 (permalink)

    Hi,

    I am using Telerik Q2 2010 WPF controls.

    Since there is really not much documentation about binding to the Selected Appointment and the examples use static binding, I am looking for an example of how to dynamically bind the Selected Appointment in my xaml code behind.

    i try this code

    SelectedAppointment="{Binding SelectedItem, UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"

    but it's not working


    Thanks.


    Reply

  • George George admin's avatar

    Posted on Nov 3, 2010 (permalink)

    Hi,

    I tried to reproduce the problem, but to no avail. If you could give us some more details on that it would be very helpful.

    I will be glad to assist you further.

    Best wishes,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Adje avatar

    Posted on Jan 26, 2012 (permalink)

    Hello George,

    KAKA's concern is to have a code to link dynamically Binding
    SelectedAppointment of the xaml (View) in ViewModel.
    I managed to do dynamic linking with AppointmentsSource whose code is below.


    I also worry what will work in the development of My Schedule appointment.

    Thank you for sending a response.

    "
    <telerik:RadScheduler x:Name="scheduler"
                                     AppointmentsSource="{Binding Path=Appointments, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     SelectedAppointment="{Binding Path=SelectedAppointment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                     AllowDrop="False"  
                                   
                                  >



     private ObservableCollection<Appointment> mAppointments;
            public ObservableCollection<Appointment> Appointments
            {
                get
                {
                    return this.mAppointments;
                }
                set
                {
                    this.mAppointments = value;
                    this.OnPropertyChanged("Appointments");
                }
            }

     IEnumerable<Appointment> query = moduleService.GetRendeVousData();
                Appointments = new ObservableCollection<Appointment>(query);


      public IEnumerable<Appointment> GetRendeVousData()
         
            {

                AutoSecureCaisseEntities db = new AutoSecureCaisseEntities();

                var query = (from r in db.RendezVous select r);

                var rendezVous = (from c in query
                                  orderby c.OperateurDateModification descending
                                  select new Appointment()
                               {
                                   Body = c.Objet,
                                   Subject = c.Objet,
                                   Start = c.DateDebutRDV,
                                   End = c.DateFinRDV,
                                   Importance = Importance.Low,
                                   IsAllDayEvent = false,
                                   Location = AuthenticationContext.Current.CodeStation,

                               });

                return rendezVous;
              

            }

    "

    Reply

  • George George admin's avatar

    Posted on Feb 1, 2012 (permalink)

    Hello,


    First, I want to inform you that with the incoming Q1 release we stop distributing the RadScheduler control and we strongly recommender using the RadScheduleView.


    About your question - I made a sample project to show how to bind the RadScheduleView.SelectedAppointment in TwoWay binding. Please, give it a try and let me know if you experience any issues with it.

    I am glad to assist you further.


    Regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

  • Adje avatar

    Posted on Feb 1, 2012 (permalink)

    I have a concern about the control SheduleView. I made a screenshot attached that you can check it. If possible help me to use it.

    If not for the moment I use a sheduler.

    So I wonder if was possible to change the form of the appointment ?

    Thank you for your answers.
    Attached files

    Reply

  • George George admin's avatar

    Posted on Feb 3, 2012 (permalink)

    Hello,

     

    I would suggest modifying the bindings - bind the SelectedAppointment to the SelectedAppointment path and AppointmentsSource to the Appointments path in the view model. The AppointmentsSource collection expects IEnumerable collection. Please, refer to the following online documentation where you can find additional information about RadScheduleView data binding support - 
    http://www.telerik.com/help/wpf/radscheduleview-populating-with-data-data-binding-support-overview.html 




    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > How to Bind Selected Appointment
Related resources for "How to Bind Selected Appointment"

WPF Scheduler Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]