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

A few telerik newbie quesions

3 Answers 99 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Abdullah
Top achievements
Rank 1
Abdullah asked on 03 Jun 2012, 07:11 PM
Hi,

I've just downloaded the trial copy of the software and am having a play ATM.  I've done some searching but havent found the answer to my questions.  I hope someone can help!!

1. Is it possible to remove the toolbar (ref. radschedulateviewtoolbar attachment) from the RadScheduleView control?

2. I want to create a custom view which would consist of a month view (on the left) which would populate a day view (on the right) each time a specfic day is selected in the month view.  Is this possible?

3. When creating/editing appointments, is there a DelegateCommand I can use to bring up my own windows (popups), or event better is there a way I can use the telerik dialogs in my own views?

Thanks
Abs

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 05 Jun 2012, 03:26 PM
Hi Abs,

Straight to your questions:

1. In order to remove the header of the ScheduleView you need to set the NavigationHeaderVisibility="Collapsed" property.
2. The RadScheduleView control does support creating of custom views. However, in your case I would suggest you to use 2 controls bound to each other. The CurrentDate of the second ScheduleView which will display the one day view can be bound to the SelectedSlot property of the first ScheduleView control in MonthView. Alike example you could find in this online demo: ScheduleView->ScheduleView and TimeBar
3. You could suppress the showing of the default dialogs by hooking to the ShowDialog event and canceling it. Then you will be able to show your own dialog. Another option is to customize the default dialogs. More information you could find in this help article: http://www.telerik.com/help/wpf/radscheduleview-features-custom-dialogs.html

Hope this information helps.

Greetings,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Abdullah
Top achievements
Rank 1
answered on 06 Jun 2012, 03:45 PM
Konstantina, Thanks for getting back to me so quickly... I've been off for a few days celebrating the diamond Jubilee so have only just looked at your reply.

Any chance you be a bit more specific with regards to binding the CurrentDate of the second ScheduleView (Day View) to the SelectedSlot of the Month View?  I tried this as you suggested but without much success

From the "day view" ScheduleView control I set the current date using the following binding

CurrentDate="{Binding ElementName=monthView, Path=SelectedSlot}"
EDIT : I didn't realise I needed a converter for this. I have now got the the day view bound to the currently selected date in the "month view"

EDIT :  A simple converter bound to the SelectedSlot is not sufficient, as it will not cover the scenario where a user clicks away from a date (month view) onto an appointment.  To cover this scenario you need to create a multi binding as shown below

<telerik:RadScheduleView.CurrentDate>
    <MultiBinding Converter="{StaticResource CurrentDateConverter}">
        <Binding ElementName="monthView" Path="SelectedAppointment"/>
        <Binding ElementName="monthView" Path="SelectedSlot"/>
    </MultiBinding>
</telerik:RadScheduleView.CurrentDate>

The multi value converter was implemented as follows.

public class CurrentDateConverter : IMultiValueConverter
{
    public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        Appointment selectAppointment = values[0] as Appointment;
        if (selectAppointment != null)
        {
            return selectAppointment.Start.Date;
        }
        else
        {
            Slot selectedSlot = values[1] as Slot;
            if (selectedSlot != null)
            {
                return selectedSlot.Start.Date;
            }
        }
         
        // if all else fails return todays date
        return DateTime.Now.Date;
    }
 
    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}


Also, do I still need to set the AppointmentSource?
EDIT : Silly question really :) of course I do.  But whats the best way of filtering the Appointments for the currently selected date (as above)?

Thanks,
Abs
0
Lancelot
Top achievements
Rank 1
answered on 07 Jun 2012, 08:57 PM
Hi Abs,

You would need to set an appointments binding as well, like you've alluded to. This link will bring you to the documentation on the DataBinding features of RadScheduleView. Since you are using double binding on your CurrentDate converter, you can do the same on your Appointment by using an AppointmentsConverter".

While you're in the documentation (if you look in the left pane, you can see all the other docs on the features of the control... a great read if you ask me) check out this section on updating the resources during runtime. It should give you some direction on how to ahieve your goals.

If this doesn't help you, can you share your code and I'd be glad to help you through the issue.

Good luck!
Lancelot
Tags
ScheduleView
Asked by
Abdullah
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Abdullah
Top achievements
Rank 1
Lancelot
Top achievements
Rank 1
Share this question
or