We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Appointment not displaying in horizontal orientation and in Month view of Vertical Orientation

Thread ID:

Created:

Updated:

Platform:

Replies:

131646 Jul 20,2017 08:40 PM Jul 24,2017 08:00 AM ASP.NET MVC 3
loading
Tags: Schedule
Charles
Asked On July 20, 2017 08:40 PM

Good day, 

I am using Version 15.2.0.40 of Essential Studio.

Anytime I use resources either single or multiple, the appointments does not display in the Horizontal Orientation at all (Day, Month, Week) except in Agenda but it does display in Vertical Orientation except in Month View.

Find Below my .cshtml code

{

  List<String> Group = new List<String>();

    Group.Add("Owners");

}

                @{List<string> view = new List<string>() { "Day", "Week", "Month", "Agenda" };}

                @(Html.EJ().Schedule("routeSchedule")

                          .Width("100%")

                          .Height("525px")

                          .CellWidth("50px")

                          .CurrentDate(DateTime.Now)

                          .Orientation(Orientation.Horizontal)

                          .Resources(res =>

                          {

                              res.Field("OwnerId").Title("Owner").Name("Owners").AllowMultiple(true).ResourceSettings(flds => flds.Datasource(CompanyRoutes)

                                  .Text("Text").Id("Id").Color("Color")).Add();

                          })

                          .Group(gr => gr.Resources(Group))

                          //.ShowLocationField(true)

                          .CategorizeSettings(cat => cat.Enable(true))

                          //.PrioritySettings(pri => pri.Enable(true))

                         

                          .Views(view)

                          .CurrentView(CurrentView.Day)

                          .AppointmentSettings(fields => fields.Datasource(ds => ds.URL(@Url.Action("GetCompanyScheduledRoutes", "Route", new { companyid = Model.Id, routeid = firstroute, territoryid = firstterritory })).InsertURL(Url.Action("AddScheduledRoutes", "Route", new { companyid = Model.Id }))

                    .BatchURL(@Url.Action("Crud", "Route")).Adaptor(AdaptorType.UrlAdaptor))

                              .Id("Id")

                              .Subject("Subject")

                              .StartTime("StartTime")

                              .EndTime("EndTime")

                              .Description("Comments")

                              .AllDay("AllDay")

                              .Recurrence("Recurrence")

                              .RecurrenceRule("RecurrenceRule")

                              .RecurrenceId("RecurrenceId")

                              .RecurrenceExDate("RecurrenceExDate")

                              .Location("Location")

                              .ResourceFields("OwnerId"))

                              .ScheduleClientSideEvents(eve => eve.Navigation("OnNavigation").AppointmentWindowOpen("onAppointmentWindowOpen"))


Sample Resource

[{

"Text": "LAGOS-Lagos(Yaba) -> ANAMBRA-AWKA(AWKA)",

"Id": "29",

"Color": "#f8a398",

"WorkHourStart": 0,

"WorkHourEnd": 0,

"CustomDays": null

},

{

"Text": "LAGOS-Lagos(Yaba) -> EDO-BENIN(UGBOWO)",

"Id": "28",

"Color": "#f8a398",

"WorkHourStart": 0,

"WorkHourEnd": 0,

"CustomDays": null

},

{

"Text": "LAGOS-Lagos(Yaba) -> EDO-BENIN(USELU)",

"Id": "27",

"Color": "#f8a398",

"WorkHourStart": 0,

"WorkHourEnd": 0,

"CustomDays": null

}]

Sample Appointment

[{

"Subject": "23:59",

"Description": null,

"StartTime": "2017-07-18T23:14:00",

"EndTime": "2017-07-18T23:59:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 29,

"CompanyId": 1,

"Id": 5,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 29

},

{

"Subject": "23:59",

"Description": null,

"StartTime": "2017-07-09T23:14:00",

"EndTime": "2017-07-09T23:59:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 29,

"CompanyId": 1,

"Id": 6,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 29

},

{

"Subject": "1:30 AM",

"Description": null,

"StartTime": "2017-07-20T00:45:00",

"EndTime": "2017-07-20T01:30:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 29,

"CompanyId": 1,

"Id": 11,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 29

},

{

"Subject": "3:05 PM",

"Description": null,

"StartTime": "2017-07-06T14:20:00",

"EndTime": "2017-07-06T15:05:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 29,

"CompanyId": 1,

"Id": 20,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 29

},

{

"Subject": "3:20 PM",

"Description": null,

"StartTime": "2017-07-08T14:35:00",

"EndTime": "2017-07-08T15:20:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 29,

"CompanyId": 1,

"Id": 24,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 29

},

{

"Subject": "1:30 PM",

"Description": null,

"StartTime": "2017-07-20T12:45:00",

"EndTime": "2017-07-20T13:30:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 29,

"CompanyId": 1,

"Id": 25,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 29

},

{

"Subject": "23:59",

"Description": null,

"StartTime": "2017-07-09T23:14:00",

"EndTime": "2017-07-09T23:59:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 28,

"CompanyId": 1,

"Id": 2,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 28

},

{

"Subject": "3:22 PM",

"Description": null,

"StartTime": "2017-07-01T14:37:00",

"EndTime": "2017-07-01T15:22:00",

"StartTimeZone": "UTC +01:00",

"EndTimeZone": "UTC +01:00",

"Categorize": null,

"AllDay": false,

"Recurrence": false,

"RecurrenceRule": null,

"Territory": "LAGOS",

"RouteId": 28,

"CompanyId": 1,

"Id": 26,

"TerritoryId": 1,

"TerritoryRoutes": null,

"CompanyName": "EDEGBE MOTORS NIGERIA",

"RoomId": 1,

"OwnerId": 28

}]

I want to use TerritoryId and RouteId in place of RoomId and OwnerId but was using OwnerId and RoomId to Test initially before changing.

Please help me with what am getting wrong.


Find Below Snapshot of Results.




Attachment: Horizontal_View_Schedule_Issues_723cbf80.zip

Karthigeyan Krishnamurthi [Syncfusion]
Replied On July 21, 2017 05:25 AM

Hi Charles, 
 
Thank you for contacting Syncfusion support. 
 
In your code example, resource id is given is declared as string type but in appointment collection int value is assigned to OwnerId field which is the case for the issue. Kindly use resource id field as int type in both resource and appointment collection as shown below. We have prepared the sample for your reference which can be download from the below location. 
 
                      

Regards,
 
Karthigeyan 





Charles
Replied On July 21, 2017 10:59 AM

Thanks a lot. Working now.


Sellakumar [Syncfusion]
Replied On July 24, 2017 08:00 AM

Hi Charles, 
  
We are glad to hear that our provided solution worked well at your end. Kindly let us know, if you need any further assistance on this. 
 
Regards, 
Sellakumar K

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;