Scheduler for ASP.NET AJAX supports resources created at run time through the Master Resources List dialog box or by adding code to the form at design time. Once added to the master list, the resource can be assigned to an appointment.
To add a resource at run time:
1. Add a new or open an existing appointment.
2. Click the Resources button in the Appointment dialog box. The Resources dialog box appears.
3. Click the Master List button.
4. In the Master Resources List, enter a resource in the text box and click Add.
The new resource is added to the list.
5. Click OK to close the Master Resources List dialog box.
To add a resource programmatically:
The following code, added to the Page_Load event, creates a Digital Projector resource at design time.
' Create the Digital Projector resource.
Dim rescol As C1.C1Schedule.ResourceCollection
rescol = Me.C1Schedule1.DataStorage.ResourceStorage.Resources
Dim roomres As New C1.C1Schedule.Resource
roomres.Text = "Digital Projector"
' Insert the resource into the Main List of Resources.
// Create the Digital Projector resource.
rescol = this.c1Schedule1.DataStorage.ResourceStorage.Resources;
C1.C1Schedule.Resource roomres = new C1.C1Schedule.Resource();
roomres.Text = "Digital Projector";
// Insert the resource into the Main List of Resources.
When you run the application, the new resource appears in the Resources dialog box when the Resources button is clicked in the Appointment dialog box: