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

Bind Selected Appointment from ScheduleView to Local Variable

2 Answers 78 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Abdulaziz
Top achievements
Rank 1
Abdulaziz asked on 29 Jun 2014, 09:39 AM
  •  Hi,,
    Am Using MVVM  ,
    Is It Possible to bind Selected Appointment  from Schedulview to local Variable.

    I try the Following Code ,

    in xaml
     <telerik:RadScheduleView
    Grid.Row="1"
    Name="xRadScheduleView"
    SelectedAppointments="{Binding MyAppointments}" >


    in ViewModel

    private Appointment _MyAppointments;
    publicAppointment  MyAppointments
    {    get { return _MyAppointments; } 
       set    {  if (value  ==  _MyAppointments)
                     return;
         _MyAppointments =value;   
    on propertychanged("MyAppointments");
     }}

    dim DateFrom as datetime= MyAppointments.start();
    dim DateTo as datetime= MyAppointments.End();









2 Answers, 1 is accepted

Sort by
0
Abdulaziz
Top achievements
Rank 1
answered on 01 Jul 2014, 09:20 AM
 I solve it Guys ;

i write In xaml 

SelectedSlot"{Binding SelectedAppoint,Mode=TwoWay}"

and then in VM 

private Slot _SelectedAppoint;
public Slot  SelectedAppoint
{    get { return _SelectedAppoint; } 
   set    {  if (value  ==  _SelectedAppoint)
                 return;
     _SelectedAppoint =value;   
on propertychanged("SelectedAppoint");
 }}
and then you can Use SelectedAppoint.start ...etc.
the main thing you have to do is TwoWay binding in SelectedSlot.






0
Kalin
Telerik team
answered on 01 Jul 2014, 10:17 AM
Hi Abdulaziz,

We are glad you have managed to achieve the desired. However you should be able to bind the SelectedAppointment as well as the SelectedSlot properties of the ScheduleView without a problem. If you have any further issues, let us know.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ScheduleView
Asked by
Abdulaziz
Top achievements
Rank 1
Answers by
Abdulaziz
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or