What is the ID of the 'Options' button in the InlineInsertTemplate?

3 posts, 1 answers
  1. ADS Development Team
    ADS Development Team avatar
    8 posts
    Member since:
    Jun 2010

    Posted 03 Nov 2010 Link to this post

    Hello,

    In my FormCreated method in the code behind, I am trying to set the visibility of the 'Options' button in the InlineInsertTemplate to false in the manner below:

    if (e.Container.Mode == SchedulerFormMode.Insert)
    {
       LinkButton Options = (LinkButton)e.Container.FindControl("InsertMoreButton");
       Options.Visible = false;
    }

    This code does not work however, as the FindControl method isn't finding the button. I.e, I get the following error: "Object reference not set to an instance of an object."

    I only want this to happen for the InlineInsert form, so using the RadScheduler property below:

    EnableAdvancedForm="false"

    ... is no good for me as this affects the Options button for both the InlineEdit and InlineInsert templates.

    Note: I am trying to avoid creating my own template, as the built-in styling over-complicates what I need to do in the time that I have.

    I look forward to your response.
  2. ADS Development Team
    ADS Development Team avatar
    8 posts
    Member since:
    Jun 2010

    Posted 03 Nov 2010 Link to this post

    Also, where can I find the IDs of all of the other fields used in the default templates?

    Regards,
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 09 Nov 2010 Link to this post

    Hi Tomos ap Robert,

    Please accept my apologies for the late reply.

    The correct ID of the "Options" button is "More". Here's the code:

    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
        {
            if (e.Container.Mode == SchedulerFormMode.Insert)
            {
                LinkButton Options = e.Container.FindControl("More") as LinkButton;
                Options.Visible = false;
            }
        }

    You can get the ID-s of the controls by browsing your web site in Mozilla Firefox and using Firebug for example. This is the way I gained the ID of the "Options" button.

    Please feel free to ask me if you have further questions.

    All the best,
    Veronica Milcheva
    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