Hi,
First of all, I want to thank you for producing such a great product like RadScheduler.
Anyway, after I have purchased and try a bit more with it in my current project, I got 2 issues which need your kindly helps/hints to sort it out.
The 1st one is that I got a script error message everytime my mouse cursor hover over any appointment which you can see in the first attachment. (I have implemented a custom provider and post the code below)
The 2nd one is that the resource header row is not well aligned correctly with the appointment area which you can see in the second attachment.
Please suggest.
Here is my custom provider code.
*Note that currently I have only one type of resource which is "Machine" and it is being stored on "MachineID" field.
I am looking forward for your suggestion.
Thank you and best regards,
Seree W.
First of all, I want to thank you for producing such a great product like RadScheduler.
Anyway, after I have purchased and try a bit more with it in my current project, I got 2 issues which need your kindly helps/hints to sort it out.
The 1st one is that I got a script error message everytime my mouse cursor hover over any appointment which you can see in the first attachment. (I have implemented a custom provider and post the code below)
The 2nd one is that the resource header row is not well aligned correctly with the appointment area which you can see in the second attachment.
Please suggest.
Here is my custom provider code.
using System; |
using System.Collections.Generic; |
using System.Linq; |
using System.Text; |
using AIAPS.DomainModel.Entities; |
using AIAPS.DomainModel.Repositories; |
using Telerik.Web.UI; |
namespace AIAPS.DomainModel.Utilities |
{ |
public class ApsSchedulerProvider : SchedulerProviderBase |
{ |
private List<Resource> _resources; |
private void LoadResources() |
{ |
_resources = new List<Resource>(); |
Resource res = new Resource("Machine", "M-001", "M-001"); |
_resources.Add(res); |
res = new Resource("Machine", "M-002", "M-002"); |
_resources.Add(res); |
res = new Resource("Machine", "M-003", "M-003"); |
_resources.Add(res); |
res = new Resource("Machine", "M-004", "M-004"); |
_resources.Add(res); |
res = new Resource("Machine", "P-001", "P-001"); |
_resources.Add(res); |
res = new Resource("Machine", "P-002", "P-002"); |
_resources.Add(res); |
} |
public ApsSchedulerProvider() |
{ |
LoadResources(); |
} |
public override void Delete(RadScheduler owner, Appointment appointmentToDelete) |
{ |
throw new NotImplementedException(); |
} |
public override IEnumerable<Appointment> GetAppointments(RadScheduler owner) |
{ |
//throw new NotImplementedException(); |
List<Appointment> appointments = new List<Appointment>(); |
foreach (ApsProcessTimeline timeline in ApsProcessTimelinesRepository.List.OrderBy(t => t.BeginTime)) |
{ |
Appointment app = new Appointment(); |
app.ID = timeline.ApsProcessTimelineId; |
app.Start = timeline.BeginTime.Value; |
app.End = timeline.FinishTime.Value; |
app.Description = timeline.MachineID; |
app.Subject = timeline.MachineID; |
app.Resources.Add(new Resource("Machine", timeline.MachineID, timeline.MachineID)); |
appointments.Add(app); |
} |
owner.TimelineView.ShowResourceHeaders = true; |
owner.TimelineView.GroupBy = "Machine"; |
owner.TimelineView.GroupingDirection = GroupingDirection.Vertical; |
//owner.TimelineView.NumberOfSlots = appointments.Count; |
owner.TimelineView.HeaderDateFormat = "dd/MM/yy"; |
owner.SelectedDate = appointments[0].Start; |
return appointments; |
} |
public override IEnumerable<ResourceType> GetResourceTypes(RadScheduler owner) |
{ |
//throw new NotImplementedException(); |
List<ResourceType> resourceTypes = new List<ResourceType>(); |
resourceTypes.Add(new ResourceType("Machine")); |
return resourceTypes; |
} |
public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType) |
{ |
//throw new NotImplementedException(); |
return _resources.FindAll(delegate(Resource res) { return res.Type == resourceType; }); |
} |
public override void Insert(RadScheduler owner, Appointment appointmentToInsert) |
{ |
throw new NotImplementedException(); |
} |
public override void Update(RadScheduler owner, Appointment appointmentToUpdate) |
{ |
throw new NotImplementedException(); |
} |
} |
} |
*Note that currently I have only one type of resource which is "Machine" and it is being stored on "MachineID" field.
I am looking forward for your suggestion.
Thank you and best regards,
Seree W.