two appointments binding (Hourly view)

4 posts, 0 answers
  1. Aldy
    Aldy avatar
    8 posts
    Member since:
    Sep 2015

    Posted 05 Oct 2015 Link to this post

    so i have RadScheduleView and RadCalendar, SelectedDate and CurrentDate is bound so when i change the dates in calendar, it will also change in ScheduleView.

    here's the problem, i want to make another ScheduleView with the same appointment but when i add it, both ScheduleView's CurrentDate is no longer bound to the SelectedDate, why?

    and how can i make a Hourly View Appointment? it's like i want to make the 2nd ScheduleView to Hourly so i have an option to open it from the 1st ScheduleView (Day View). for example when i click the slot/appointment at 1:00 time, i will be able to go to 2nd ScheduleView that have timer 1:10 1:20 ... 1:50 something like that so i can make appointment per-10min.

  2. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 07 Oct 2015 Link to this post

    Hi Aldy,

    Thank you for contacting us.

    We tried to reproduce the observed by you behavior by binding the SelectedDate property of RadCalendar to the CurrentDate of RadScheduleView but it seems everything works as expected - when a new date is selected from RadCalendar the current date of both RadScheduleViews is changed. Please, check the attached video that demonstrates that.

    As for the HourlyView what we could suggest you is to use DayViewDefinition whose DayStartTime and DayEndTime properties would be bound to to the Start and End of the SelectedSlot of the first RadScheduleView. You might also need to handle the AppointmentDeleted and AppointmentCreated events in order to achieve the desired behavior of creation of the Appointments. We have created a sample project and a video that demonstrates the described approach and you could run and evaluate it. Please, notice that this is just a sample implementation and you might need to improve it.

    Hope this helps.

    Regards,
    Nasko
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Aldy
    Aldy avatar
    8 posts
    Member since:
    Sep 2015

    Posted 11 Oct 2015 Link to this post

    thank you, but another question.

    i see this code in the file you gave me 

    <telerik:EventToCommandBehavior.EventBindings>
                    <telerik:EventBinding EventName="AppointmentCreated" Command="{Binding CreatedApp, Mode=TwoWay}" PassEventArgsToCommand="True"/>
                    <telerik:EventBinding EventName="AppointmentDeleted" Command="{Binding DeletedApp, Mode=TwoWay}" PassEventArgsToCommand="True"/>
                </telerik:EventToCommandBehavior.EventBindings>

     

    i want to know if there any other way without using EventToCommandBehavior.EventBindings ? maybe without using telerik?

    is there the same feature like MultiBinding? any sample code for this maybe?

  5. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 12 Oct 2015 Link to this post

    Hi Aldy,

    The EventToCommandBehavior is used for scenarios where the MVVM pattern is used in order to allow your event to fire and at the same time your code placed inside the ViewModel to respond accordingly.

    So, basically you could just handle the AppointmentCreated and AppointmentDeleted events in code-behind without using the EventToCommandBehavior. We have modified the sample project to handle the events and the EventToCommandBehavior is not used. Please, check it and let us know if that approach works for you.

    We hope this will help you.

    Regards,
    Nasko
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top