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

How to remove extra item(-) in rad new Scheduler appointment window

4 Answers 56 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Venkata
Top achievements
Rank 1
Venkata asked on 29 May 2012, 05:08 AM
Hi,
I am using RadScheduler to create an new appointment(i am using latest version of Telerik.Web.UI.dll  version 2012.1.501.40).
When  i bind  the ResourceType from C# code behind             
ResourceType rt = new ResourceType("UserCalender");          
rt.ForeignKeyField = "UserTypeId";
rt.KeyField = "UserTypeId";
rt.TextField = "UserTypeName";         
rt.DataSource = GetUserTypes();
RadScheduler1.ResourceTypes.Add(rt);

 i am getting 1 extra option "-" in my comboBox
Like
   "-"
   "Development"
   "Testing"

I do not want that Extra  "-" in my combobox. So How to i remove that one and how do i select default option in combobox?

4 Answers, 1 is accepted

Sort by
0
Venkata
Top achievements
Rank 1
answered on 30 May 2012, 10:23 PM
Any Help?
0
Plamen
Telerik team
answered on 31 May 2012, 03:32 PM
Hi Venkata,

 
You can refer to the Handling FormCreated help topic where Change the selected index of a resource combobox so always one option is preselected section similar scenario is explained.

Hope this will be helpful.

Greetings,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Venkata
Top achievements
Rank 1
answered on 31 May 2012, 03:42 PM
Thanks for the reply.
I can able to select one of the item.
But Still shows "-" item in my resource combobox 
How do i remove that item?
0
Venkata
Top achievements
Rank 1
answered on 31 May 2012, 04:58 PM
protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
{
    if ((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert))
    {
        RadComboBox resourceRoomCombo = e.Container.FindControl("ResRoom") as RadComboBox;
        foreach (RadComboBoxItem rcbi in resourceRoomCombo.Items)
     {
       if (rcbi.Text == "-")
       {
       resourceRoomCombo.Items.Remove(0);
       break;
       }
      
    }
}
Tags
Scheduler
Asked by
Venkata
Top achievements
Rank 1
Answers by
Venkata
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or