I'm using the WebMonthView (Version=15.1.20151.1018) to display some data "Training and Employee time"(Training) , "Equipment Rental and Employee time " (Equipment), and "Training, Equipment Rental and Employee time" (All).
I have 2 Panels, one with the filters to display the time, the other with the WebMonthView. Both panels are update panels.
I'm using the WebScheduleGenericDataProvider's ResourceDataSource to switch the calendar between the 3 views.
Right now there is no scheduled equipment data, so views Training and All have the same data.
When I load the Training view for last month the data is displayed all on one line for the week of the 9th, in the all view it displays fine.
When I load this month, the Training view is fine but the All view has the same display issue as last month's Training view.
I've tried removing all the custom formatting we do, changing the times of the appointments, changing the WebScheduleInfo1.ActiveDayUtc, taking everything out of the update panels i'm not sure what to try next.
Ok I have this solved, I looped through the appointments and make them only span the current week, I create a new appointment for the next week with the remainder of the time on the appointment I split (and so on if the appointment spans multiple weeks).
This seemed to fix some of the display issues, the current month looked good, when back and looked at the previous month and it was still bugged. I looked through the appointment data again and noticed there were some same day appointments with a 0 duration, I updated those to have a one day duration and that cleaned up the rest of the display issues.
Please help this has been an ongoing issue for a while now. Its critical now. We can't show the screen to the client looking like this.
i can't seem to post the C# code without it pending approval
when i pasted my code in it says it requires moderator approval, it seems like the mods don't approve posts...
hdnManualDateChange.Value = "0"; DateTime Helper1; DateTime Helper2; DateTime Helper3; if (DateTime.TryParse(QuickDateControl1.Earliest.Text, out Helper1)) { if (DateTime.TryParse(QuickDateControl1.Latest.Text, out Helper2)) { TimeSpan diff = (Helper2 - Helper1); Helper3 = Helper1; Helper3 = Helper3.AddDays(diff.Days / 2); Helper3 = Helper3.AddHours(8); WebScheduleInfo1.ActiveDayUtc = new SmartDate(Helper3); } }
if (chkShowExceptions.Checked && (rdoView.SelectedValue == "Monthly" || rdoView.SelectedValue == "Weekly")) { List<AppointmentObject> Exceptions = DALCompany.GetExceptionCalendarAppointments(QuickDateControl1.Earliest.Text, QuickDateControl1.Latest.Text, "", "", ("[" + DALSettings.GetProgramParameter(MineMonitor.User.ProgramID, "TrainerGroup") + "]"), "", "", true, MineMonitor.User.ProgramID, true, "All", "", 0, true); if (Exceptions != null) { foreach (AppointmentObject Exception in Exceptions) { Exception.COMM = Exception.Subject; Exception.Color = "ffcccc"; Exception.IsException = true; Exception.AppointmentFromDate = Exception.RecDate.Value.AddHours(4); if (Exception.AppointmentToDate == null) Exception.AppointmentToDate = Exception.AppointmentFromDate.Value; CurrentCalendarAppointments.Add(Exception); } } }
WebMonthView1.Visible = true; IList Resources = null; Resources = GetResources(); WebScheduleGenericProviderBindings(); WebScheduleGenericDataProvider1.ActivityDataSource = CurrentCalendarAppointments; WebScheduleGenericDataProvider1.ResourceDataSource = Resources; Session["WebSchdeuleObjects"] = new object[] { Resources, WebScheduleInfo1.Appointments, CurrentCalendarAppointments }; WebMonthView1.DataBind(); WebScheduleInfo1.DataBind();