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

Sizing of custom edit appointment dialog (template)

1 Answer 100 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 1
Jacques asked on 18 Nov 2011, 07:53 AM
Hi,

I have a custom edit appointment template which contains some controls that are made visible / collapsed based on certain selected criteria within the dialog. Unlike a normal window, the edit appointment dialog doesn't automatically resize while it's open. Is there a property or something that I can use to control this behaviour? Maybe changing the window style from a non resizeable toolbox window to one that is resizeable?

I am aware that I can use another 'factory' way of creating a custom appointment dialog as shown in the following post, but this means that I also have to implement a custom confirmation dialog, etc. and I would prefer not to have to do that.

http://blogs.telerik.com/blogs/posts/11-11-04/the-lob-chronicles-episode-13-extending-radscheduleview.aspx

Thanks!

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 23 Nov 2011, 11:46 AM
Hi Jacques,

You can customize only the EditAppointmentDialog using the IScheduleViewDialogHostFactory and and IScheduleViewDialogHost interfaces as explained here.

For example, to set the Width, Height and ResizeMode of the EditAppointmentDialog, please use the following snippet:

public class CustomScheduleViewDialogHostFactory : ScheduleViewDialogHostFactory
{
    protected override IScheduleViewDialogHost CreateNew(ScheduleViewBase scheduleView, DialogType dialogType)
    {
        var host = base.CreateNew(scheduleView, dialogType);
        var window = host as RadWindow;
 
        if (dialogType == DialogType.AppointmentDialog)
        {
            window.ResizeMode = ResizeMode.CanResize;
            window.Width = 800;
            window.Height = 600;
        }          
        return host;
    }
}

Hope this helps.

Best wishes,
Yana
the Telerik team

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

Tags
ScheduleView
Asked by
Jacques
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or