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

two appointments binding (Hourly view)

3 Answers 74 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Aldy
Top achievements
Rank 1
Aldy asked on 05 Oct 2015, 05:32 AM

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.

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 07 Oct 2015, 02:53 PM
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
0
Aldy
Top achievements
Rank 1
answered on 12 Oct 2015, 04:37 AM

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?

0
Nasko
Telerik team
answered on 12 Oct 2015, 11:53 AM
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
Tags
ScheduleView
Asked by
Aldy
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Aldy
Top achievements
Rank 1
Share this question
or