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

Resource Default

4 Answers 98 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 24 Oct 2008, 12:32 AM
I think I'm missing something that should be very simple....

How can I make a particular resource the default if none is chosen?

I'd be happy with the blank/none option being removed and a default/first resource being shown or in the code (AppointmentCreated I assume) the resource is assigned what I want the default resource to be if none were chosen.

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 24 Oct 2008, 09:57 AM
Hello Scott,

You can find the resource dropdown control in FormCreated and set its SelectedIndex for the AdvancedInsert mode using this kb article: How to access controls in the advanced form.


Greetings,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Scott
Top achievements
Rank 1
answered on 29 Oct 2008, 07:08 PM
Peter,

Thanks!  I'll try that for now.  Is there a way to remove the blank option?

Scott
0
Accepted
Peter
Telerik team
answered on 30 Oct 2008, 09:17 AM

Hello Scott,

Yes, you can use the RemoveAt method to remove the first item:

 protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)  
    {  
        if (e.Container.Mode == SchedulerFormMode.AdvancedInsert)  
        {  
            DropDownList resRoomDDL = (DropDownList)e.Container.FindControl("ResRoom");  
           resRoomDDL.Items.RemoveAt(0);  
           resRoomDDL.SelectedIndex = 1;    
        }  
 
        if (e.Container.Mode == SchedulerFormMode.AdvancedEdit)  
        {  
            DropDownList resRoomDDL = (DropDownList)e.Container.FindControl("ResRoom");  
            resRoomDDL.Items.RemoveAt(0);  
        }  
    } 

Note that with Q3 2008, the resource dropdown lists will have a "Res" prefix.
Best wishes,

Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Scott
Top achievements
Rank 1
answered on 30 Oct 2008, 09:46 PM
I've seen by reading other questions and responses but now that I've been able to experience the support first hand, I must say, excellent response times and support to the end-users (developers)!  Thank you,

Scott
Tags
Scheduler
Asked by
Scott
Top achievements
Rank 1
Answers by
Peter
Telerik team
Scott
Top achievements
Rank 1
Share this question
or