Hi
I know this must be quite simple, but none of the examples are quite doing what I am so I am unsure what I need to do!
I am setting custom resources to an appointment which are showing fine and can be selected when inserting, but when I am editing an appointment I don't know how to bind the selected values for the custom resource.
I have looked at this page http://www.telerik.com/community/code-library/aspnet-ajax/scheduler/customize-the-advanced-form-with-the-advanced-template-user-controls.aspx which was suggested on a previous post but this appears to be just for custom advanced forms but I am not using a custom form, I am just using custom resources.
A simplified version of how I am adding the custom resources:
When I bind the scheduler I an doing this:
Where GetSchedule returns a collection of appointments from a table set up as per the documentation.
The selected users are stored in a table called UserAppointments, where the appoinmentId is stored against the user ID.
How do I bind these values back so they are selected when I edit the appointment?
Bex
I know this must be quite simple, but none of the examples are quite doing what I am so I am unsure what I need to do!
I am setting custom resources to an appointment which are showing fine and can be selected when inserting, but when I am editing an appointment I don't know how to bind the selected values for the custom resource.
I have looked at this page http://www.telerik.com/community/code-library/aspnet-ajax/scheduler/customize-the-advanced-form-with-the-advanced-template-user-controls.aspx which was suggested on a previous post but this appears to be just for custom advanced forms but I am not using a custom form, I am just using custom resources.
A simplified version of how I am adding the custom resources:
if (!IsPostBack) {
SchToday.CustomAttributeNames = new string[] { "Added Users", "Type" }; //type is added separately and works fine, the users are added separately as they are only added under certain circumstances. SetUsersResource();} private void SetUsersResource() { UserDetailCollection allUSers = UserManager.GetAllUsers(); ResourceType users = new ResourceType("Added Users"); users.AllowMultipleValues = true; users.ForeignKeyField = "AppointmentId"; SchToday.ResourceTypes.Add(users); foreach (UserDetail user in allUSers) { SchToday.Resources.Add(new Resource("Added Users", user.UserId, user.FullName)); } }When I bind the scheduler I an doing this:
SchToday.DataSource = GetSchedule();The selected users are stored in a table called UserAppointments, where the appoinmentId is stored against the user ID.
How do I bind these values back so they are selected when I edit the appointment?
Bex