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

Resource Availability Application Scenario: Assigning multiple resources (users) to an appointment

2 Answers 36 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 07 Jun 2012, 11:36 AM
Hello,

How could i assign multiple resources (users) to an appointment? I'm using RadComboCox as CheckBox (CheckBoxes="true" EnableCheckAllItemsCheckBox="true") :
<telerik:RadComboBox CheckBoxes="true" EnableCheckAllItemsCheckBox="true" runat="server" ID="UsersComboBox" DataTextField="Text" DataValueField="Key"
                           Width="80px" Skin="Default" SelectedValue='<%# Bind("UserID") %>' DataSource="<%# GetAvailableUsers(Container) %>">
                       </telerik:RadComboBox>
 
and i have made the following changes to the RadScheduler1_AppointmentCreated event with no result.

protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
   {
 
       List<string> users = new List<string>();
       foreach (Resource user in e.Appointment.Resources.GetResourcesByType("User"))
       {
           users.Add(user.Text);
       }
 
       if (users.Count > 0)
       {
           Label assignedTo = (Label)e.Container.FindControl("AssignedTo");
           assignedTo.Text = "Assigned to: " + string.Join(", ", users.ToArray());
       }
 
   }


How could i bind the users so as to have a result like: "Held by: Charlie, Alex"?

Thank you very much.

2 Answers, 1 is accepted

Sort by
0
George
Top achievements
Rank 1
answered on 10 Jun 2012, 10:35 AM
Any answer?
0
Plamen
Telerik team
answered on 12 Jun 2012, 10:37 AM
Hello George,

 
The code behind that you pasted is the same as in our Multiple Resource Values. If you want to use multiple resources in an Advanced Template we recommend using code as in this demo. We usually recommend implementation with a user control with multiple check boxes as in the example. If you want to replace it with RadCombobox you will have to add it in the MultipleValueResourceControl page and populate each checked resource.

Hope this information will be helpful.

All the best,
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.
Tags
Scheduler
Asked by
George
Top achievements
Rank 1
Answers by
George
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or