Nice feature adding in ResourceStyles, I'd like to integrate with my current app. I'm using a custom data provider so I can support multiple resources (classes and classrooms, classes can be in multiple classrooms)
I'm currently doing this below:
| List<Room> roomList = GetRoomList(); //returns list of rooms (ID, Name, Abbreviation, ScheduleColor); |
| foreach (Room room in roomList) |
| { |
| schedulerMain.ResourceStyles.Add(new ResourceStyleMapping("Room", room.RoomID.ToString(), room.Name, room.ScheduleColor)); |
| } |
This works great, except for appointments with multiple resources. So I figure on AppointmentDataBound, if the appointment has more than one resource, remove it and use a default style. How do I remove the current resource style that is applied, ie. something like this:
| protected void schedulerMain_AppointmentDataBound(object sender, SchedulerEventArgs e) |
| { |
| List<Resource> resources = (List<Resource>)e.Appointment.Resources.GetResourcesByType("Room"); |
| if (resources.Count > 1) |
| { |
| //use different resource style |
| } |
| } |
I appreciate any help you can send my way, thanks guys!