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

3 posts, 0 answers
  1. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 21 Jun 2010 Link to this post


    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. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 21 Jun 2010 Link to this post

    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
  3. DevCraft R3 2016 release webinar banner
  4. Dobry Zranchev
    Dobry Zranchev avatar
    348 posts

    Posted 24 Jun 2010 Link to this post

    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
Back to Top