Custom Resource - hide from user

4 posts, 1 answers
  1. Tom Kaminski
    Tom Kaminski avatar
    7 posts
    Member since:
    Aug 2007

    Posted 30 Jul 2009 Link to this post

    I am developing a site that handles content based on the domain name requested.  Code in global.asax assigns a DeptID based on the domain.  In using the scheduler, I only want to show/handle appointments for this DeptID.  I think I need to treat this like a custom resource - but how do I implement that?  I see how the documentation handles Rooms and Users, but I don't want to expose DeptID for the user to make a choice, and all appointments need to be filtered/inserted/updated for this DeptID only.
  2. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 31 Jul 2009 Link to this post

    Hello Tom,

    You can hide the resource dropdown and label in the advanced form using the following kb article:
    http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-access-controls-in-the-advanced-form.aspx

    Here is the specific code for your case:
    protected void RadScheduler2_FormCreated(object sender, SchedulerFormCreatedEventArgs e)  
        {  
            if (e.Container.Mode == SchedulerFormMode.AdvancedEdit || e.Container.Mode == SchedulerFormMode.AdvancedInsert)  
            {  
                RadComboBox resComboBox = e.Container.FindControl("ResDeptID"as RadComboBox;  
                resComboBox.Visible = false;  
     
                WebControl resLabel = e.Container.FindControl("LblResDeptID"as WebControl;  
                resLabel.Controls.Clear();  
            }  
        } 



    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tom Kaminski
    Tom Kaminski avatar
    7 posts
    Member since:
    Aug 2007

    Posted 31 Jul 2009 Link to this post

    Thanks Peter!

    I'm actually learning how to customize the advanced template.
    http://www.telerik.com/help/aspnet-ajax/schedule_advancedformtemplate.html
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 03 Aug 2009 Link to this post

    Hi Tom,

    I can see where the confusion comes from. Just to clarify, the help topic which you have seen shows how to use templates to customize the advanced form, while the kb article I referred you to, shows how to customize the default advanced form. Anyway, I am glad to learn that this is sorted out for you.


    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top