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

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

2 Answers 83 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
ADS Development Team
Top achievements
Rank 1
ADS Development Team asked on 03 Nov 2010, 02:59 PM
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 Answers, 1 is accepted

Sort by
0
ADS Development Team
Top achievements
Rank 1
answered on 03 Nov 2010, 04:04 PM
Also, where can I find the IDs of all of the other fields used in the default templates?

Regards,
0
Accepted
Veronica
Telerik team
answered on 09 Nov 2010, 01:43 PM
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
Tags
Scheduler
Asked by
ADS Development Team
Top achievements
Rank 1
Answers by
ADS Development Team
Top achievements
Rank 1
Veronica
Telerik team
Share this question
or