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

Resource types need to dissplay "--Select--"

2 Answers 39 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
chirag shah
Top achievements
Rank 1
chirag shah asked on 28 Apr 2010, 08:01 AM
In the new appontment  template I have dropdown with 3 items using Resources. but the top element is displaying "-". I want to remove "-" and want to write "--Select--" instead.

How can I achieve it ?

I am using asp.net ajax radscheduler. and this is inbuilt advance template not custom template.

2 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 29 Apr 2010, 04:18 PM
Hello chirag,

All you need is to subscribe to FormCreated event. Then find the RadComboBox for your resource type and change the first item's text to "-- Select --":

protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
    {
        if ((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert))
        {
            RadComboBox roomComboBox = e.Container.FindControl("resRoom") as RadComboBox;
            roomComboBox.Items[0].Text = "-- Select --";
        }
    }

<telerik:RadScheduler ID="RadScheduler1" runat="server" AllowInsert="true" 
            onformcreated="RadScheduler1_FormCreated">
        </telerik:RadScheduler>

In the above code, 'Room' is the resource type name, but we need the 'res' prefix also to find the combobox control.

Kind regards,
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.
0
chirag shah
Top achievements
Rank 1
answered on 30 Apr 2010, 01:59 PM
Thanks. It is working perfectly
Tags
Scheduler
Asked by
chirag shah
Top achievements
Rank 1
Answers by
Veronica
Telerik team
chirag shah
Top achievements
Rank 1
Share this question
or