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. Image for the cookie policy date
close icon

Resource View Error

sir,
        i run the samples of scheduler mvc given in the tutorials. i used the scheduler mvc for resource view.
      
       i got the error in multipleresource.cshtml. I have attached the error screenshot. Please suggest me the solution for this.


Thanks
Saravanan .T






      



Attachment: scheduler_error_c85bebb3.zip

1 Reply

VS Velmurugan S Syncfusion Team September 18, 2015 10:12 AM UTC

Hi Saravanan,
Thank you for Contacting Syncfusion product.

We have analyzed your mentioned scenario based on the given screenshot and suspect that the resources are not properly bind to the Schedule control. We request you to check the whether you bind/map the resources properly. Please find the following code example to bind the resources to Schedule control in view page.

<code>

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

        .Width("100%")

        .Height("525px")

        .TimeMode(Syncfusion.JavaScript.TimeMode.Hour12)

        .CurrentDate(new DateTime(2014, 6, 2))

        .Resources(res =>

              { // We need to bind the resources like this to display the resources properly in the schedule control

                  res.Field("OwnerId").Title("Owner").Name("Owners").AllowMultiple(true)

                  .ResourceSettings(flds => flds.Datasource((System.Collections.IEnumerable)ViewBag.Owners).Text("text").Id("id").Color("color")).Add();

              })

              .Group(gr =>

              {

                  gr.Resources(ViewBag.Resources);

              })

        .AppointmentSettings(fields => fields.Datasource(Model)

            .Id("Id")

            .Subject("Subject")

            .StartTime("StartTime")

            .EndTime("EndTime")

            .AllDay("AllDay")

            .Recurrence("Recurrence")

            .RecurrenceRule("RecurrenceRule")

            .ResourceFields("OwnerId"))   // Here we need to map the resource field name to display the appointments in corresponding resource
)

</code>
Also, we  have prepared the sample for the scenario “Schedule control with multiple resource” and it can be downloaded from the following location: 

http://www.syncfusion.com/downloads/support/forum/120286/ze/ScheduleSampleMultipleResource1545265926

Please try the above sample, if you are still facing the same issue at your end kindly revert back to us with reproduced issue in the above sample or share the code example that you have used in the view page to render the resource and issue reproducing sample so that we can analyze the reported scenario and provide you the solution.
Regards,
Velmurugan


Loader.
Live Chat Icon For mobile
Up arrow icon