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

Custom EditAppointmentDialog: clearing "None" and "(Any)" from resource dropdown

2 Answers 64 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 21 Jun 2010, 05:51 PM
Hi,

We've derived a custom class that inherits EditAppointmentDialog, and have used it to do such things as pre-populate the subject line. Now - and I am not the guru here - I must populate the resource dropdown WITHOUT the "(None)" and "Any" entries that are automatically included.

We use the AppointmentEditDialogShowing event handler of the RadScheduler to set up our own custom appointment editor. This seems like the place to initialize the resource dropdown list. I'm working on it. If you can give me a clue, I'll appreciate it greatly.

2 Answers, 1 is accepted

Sort by
0
Jim
Top achievements
Rank 1
answered on 21 Jun 2010, 06:53 PM
While not exceedingly pleased with the following code, it does disable the "None" and "(Any)" choices in my dropdown. Provided users cannot choose these items, not system crash will occur. Still looking for a better solution, though.

I put this code in the LoadSettingsFromEvent sub of the custom appointment-editing form.

' Attempting to suppress "None" and "(Any)" from resource dropdown:
If Me.cmbResource.Items(0).Text.Trim.ToUpper.Equals("NONE") OrElse Me.cmbResource.Items(0).Text.Trim.ToUpper.Equals("(ANY)") Then
            Me.cmbResource.Items(0).Enabled = False
End If

If Me.cmbResource.Items(1).Text.Trim.ToUpper.Equals("NONE") OrElse Me.cmbResource.Items(1).Text.Trim.ToUpper.Equals("(ANY)") Then
            Me.cmbResource.Items(1).Enabled = False
End If
0
Dobry Zranchev
Telerik team
answered on 24 Jun 2010, 04:47 PM
Hi Jim Benson,

Thank for contacting us.
 
If you do not want to see "NONE" and "(All)" resources, you can remove them from your custom dialog in the LoadSettingsFromEvent method and call the base method after that.

I hope this will help you.

Kind regards,
Dobry Zranchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler and Reminder
Asked by
Jim
Top achievements
Rank 1
Answers by
Jim
Top achievements
Rank 1
Dobry Zranchev
Telerik team
Share this question
or