Selecting only a single resource in an Scheduler Appointment

1 Answer 30 Views
Scheduler and Reminder
Troy
Top achievements
Rank 2
Iron
Iron
Iron
Troy asked on 01 Jan 2022, 01:03 AM

How do I select only a single resource in an appointment scheduler?  I'm using an unbound scheduler and need it to only allow a single resource to be selected (not multiple).

1 Answer, 1 is accepted

Sort by
0
Dinko
Telerik team
answered on 04 Jan 2022, 10:19 AM

Hello Troy,

Thank you for your interest in our RadScheduler control for WinForms.

Let me first start with that with the R1 2021 version of our controls EditAppointmentDialog provides UI for selecting multiple resources per appointment. Before that single selection was only available. The RadDropDownList is replaced with a RadCheckedDropDownList to provide multiple selections. However, we understand that there could be cases where a single selection will be required. That is why we have left the old RadDropDownList control and hidden it. What you can do to use it is to create a custom class that derives from EditAppointmentDialog. Then override the LoadSettingsFromEvent method. Inside the method, you can hide the new RadCheckedDropDownList and show the RadDropDownList which has a single selection. The following code demonstrates what I have in mind. You can replace the default dialog with the custom one in the AppointmentEditDialogShowing event of the RadScheduler.

private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
{
    e.AppointmentEditDialog = new MyDialog();
}
class MyDialog: EditAppointmentDialog
{
    protected override void LoadSettingsFromEvent(IEvent sourceEvent)
    {
        base.LoadSettingsFromEvent(sourceEvent);
        this.cmbResource.Visible = true;
        this.checkedCmbResource.Visible = false;
    }
}

I hope this information is helpful.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Scheduler and Reminder
Asked by
Troy
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dinko
Telerik team
Share this question
or