Regarding Rad scheduler UI apointments not being added

1 posts, 0 answers
  1. srivaishnav
    srivaishnav avatar
    1 posts
    Member since:
    Jun 2019

    Posted 02 Jun Link to this post

    I have a problem displaying appointments in the first row. They add to the database but disapear on the UI. 

     

    Here is the code for my rad Scheduler

          <telerik:RadScheduler ID="AttendanceScheduler" runat="server" Skin="Office2007"
                        Width="100%" Height="100%"
                        StartEditingInAdvancedForm="true" SelectedView="TimelineView" 
                        DisplayDeleteConfirmation="true" DayStartTime="08:00:00" DayEndTime="18:00:00"
                        TimeZoneOffset="0:00:00" HoursPanelTimeFormat="h:mm tt" NumberOfHoveredRows="1"
                        ShowHeader="false" ShowAllDayRow="false" ShowFullTime="false" ShowNavigationPane="false"
                        GroupBy="DayOfWeek" EnableResourceEditing="true" CustomAttributeNames=""
                        EnableCustomAttributeEditing="false" VisibleAppointmentsPerDay="1"
                        OnClientRequestSuccess="requestSuccess"
                        OnClientRequestFailed="requestFailed" OnClientAppointmentsPopulating="AttendancePopulating"
                        OnClientAppointmentsPopulated="AttendancePopulated"
                        OnClientTimeSlotClick="OnClientTimeSlotClick" OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick"
                        OnClientAppointmentInserting="AttendanceInserting" OnClientAppointmentCreated="AttendanceCreated"
                        OnClientAppointmentEditing="AttendanceEditing"
                        OnClientAppointmentMoveEnd="OnAttendanceMoveEnd"
                        OnClientAppointmentResizeEnd="OnAttendanceResizeEnd">
                        <MonthView UserSelectable="false" />
                        <TimelineView ColumnHeaderDateFormat="hh:mm tt" HeaderDateFormat="hh:mm tt" NumberOfSlots="48"
                            SlotDuration="00:15:00"  GroupBy="DayOfWeek" TimeLabelSpan="1" StartTime="08:00" GroupingDirection="Vertical"
                            UserSelectable="false" />
                        <DayView UserSelectable="false" />
                        <WeekView UserSelectable="false" />
                        <WebServiceSettings Path="ClientAttendanceTemplateService.svc" ResourcePopulationMode="Manual"
                            GetResourcesMethod="GetClientAttendanceResources" GetAppointmentsMethod="GetClientAttendances"
                            InsertAppointmentMethod="InsertClientAttendance" UpdateAppointmentMethod="UpdateClientAttendance"
                            DeleteAppointmentMethod="DeleteClientAttendance" CreateRecurrenceExceptionMethod="CreateClientAttendanceRecurrenceException"
                            RemoveRecurrenceExceptionsMethod="RemoveClientAttendanceRecurrenceExceptions" />
                        <Localization ConfirmDeleteText="Are you sure you want to delete this Attendance?"
                            ConfirmDeleteTitle="Confirm Attendance Delete" />
                    </telerik:RadScheduler>

     

    I am adding the resources in the backend using code below

     

      private IEnumerable<Resource> GetResources()
            {
                List<Resource> resources = new List<Resource>();
                for (int i = 0; i < 7; i++)
                {

                    string dayOfWeek = GetDayOfWeek(i);
                    Resource res = new Resource("DayOfWeek", i, dayOfWeek);
                    resources.Add(res);
                }

                return resources;
            }

            private string GetDayOfWeek(int dow)
            {
                string dayOfWeek = "";
                switch (dow)
                {
                    case 1:
                        dayOfWeek = "Monday";
                        break;
                    case 2:
                        dayOfWeek = "Tuesday";
                        break;
                    case 3:
                        dayOfWeek = "Wednesday";
                        break;
                    case 4:
                        dayOfWeek = "Thursday";
                        break;
                    case 5:
                        dayOfWeek = "Friday";
                        break;
                    case 6:
                        dayOfWeek = "Saturday";
                        break;
                    case 0:
                        dayOfWeek = "Sunday";
                        break;

                }
                return dayOfWeek;
            }

     

    Only the first row of the scheduler doesn't show the added appointment!

Back to Top