Remove Fields From Custom Appointment Dialog

6 posts, 0 answers
  1. Ian Scholz
    Ian Scholz avatar
    2 posts
    Member since:
    Aug 2009

    Posted 13 May 2010 Link to this post

    Hello:

    I have seen plenty of posts, webinar and code examples detailing how to add custom fields to an inherited class of the Appointment dialog used with RadScheduler. What I would like to know is the reverse of adding custom fields; How do I remove fields from an inherited or derived class of the Appointment dialog. If I remove some of the default fields from the inherited form, will that cause unintended problems because I simply removed the unwanted fields from the form? Or is there a simpler way of hiding the form files by the way of property dialogs on the RadScheduler control, or should I simply hide (make the fields non visible) on the inherited form from the Appointment dialog?

    Thanks!

  2. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    353 posts

    Posted 14 May 2010 Link to this post

    Hello Ian Scholz,

    Thank you for writing.

    There is no better way to just hide the controls in the form. The other way is to create a custom form from scratch and perform this manually.

    If you have other questions do no hesitate to contact us.

    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.
  3. Ian Scholz
    Ian Scholz avatar
    2 posts
    Member since:
    Aug 2009

    Posted 14 May 2010 Link to this post

    Ok.  So I inherited from EditAppointmentDialog class and was able to hide the controls I did not want visible on the form but I'm not able to hide the associated labels;  At runtime the unwanted controls are not visible, but the associated labels are. 

    Also, all the properties are disabled for the label controls and are locked so I cannot hide or delete the them.  

    Additionally, I tried to set the title of the dialog to something other than the default but when the dialog is visible in the running application, I get the default title for my custom Appointment dialog.  How do I override this behavior?

    Thanks!
  4. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    353 posts

    Posted 17 May 2010 Link to this post

    Hi Ian Scholz,

    Thank for writing back to me.

    You are right about the labels and the other controls - we will unlock these in the next major release in order to allow for removing them. Please, excuse us for the inconvenience.

    You can change the EditAppointmentDialog title by:

    1. Creating a class that inherits RadSchedulerLocalizationProvider and overrides its method GetLocalizationString:
     
    class CustomLocalization : RadSchedulerLocalizationProvider
    {
        public override string GetLocalizedString(string id)
        {
            if (id == RadSchedulerStringId.AppointmentDialogTitle)
                return "custom title";
            return base.GetLocalizedString(id);
        }
    }
     
    The class RadSchedulerStringId contains all string constants that are represented in the scheduler. To change the title of the EditAppointmentDialog return a different value only if the requested id is
    AppointmentDialogTitle, otherwise call the base method.
     
    2. Set the new localization provider to be the default provider:
     
    RadSchedulerLocalizationProvider.CurrentProvider = new CustomLocalization();

    I hope this will help you.

    Sincerely yours,
    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.
  5. Sina
    Sina avatar
    8 posts
    Member since:
    Jun 2018

    Posted 01 Jul 2018 in reply to Dobry Zranchev Link to this post

    Could you help me about how i can design an edit appointment dialog from the scratch? 
  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3276 posts

    Posted 02 Jul 2018 Link to this post

    Hello, Sina,    

    The following help article is quite useful on this topic: https://docs.telerik.com/devtools/winforms/scheduler/dialogs/editappointmentdialog

    I hope this information helps. If you have any additional questions, please let me know. 
     
    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top