Skip to content

View modes not rendered on Scheduler when property set on model #2256

Open
@paulmoore1

Description

@paulmoore1

Description

When the view mode for a Scheduler is set on the model in ASP.NET Core, it fails to render correctly.
From inspecting the behaviour in the console, this appears to be because the viewMode variable in the JavaScript is all lowercase e.g. "monthview" instead of "monthView". This means that it fails to be matched correctly (see attached screenshot).

  • ignite-ui version: Ignite UI for ASP.NET Core
  • browser: any

Steps to reproduce

(code sample attached)

  1. Make a model that extends the Infragistics SchedulerModel
public class UISchedulerModel : SchedulerModel
{
  public UISchedulerModel(IEnumerable<UISchedulerAppointmentModel> appointments, IEnumerable<SchedulerViewMode> views = null)
  {
    DataSource = appointments.AsQueryable();
    Views = views?.ToList() ?? new List<SchedulerViewMode>();
  }
}
  1. Render the model in a view using the SchedulerWrapper
@using Infragistics.Web.Mvc
@model Program.Namespace.UISchedulerModel
@{
  SchedulerWrapper myScheduleWrapper = new SchedulerWrapper(Html)
  {
    Model = Model
  };
}

@(myScheduleWrapper.Render())
  1. ...

Result

If the views parameter passed in to the model is null, then the scheduler renders correctly.
If a value is set for the views e.g.
IEnumerable<SchedulerViewMode> viewModes = new List<SchedulerViewMode>() { SchedulerViewMode.MonthView, SchedulerViewMode.AgendaView }; then the scheduler fails to render

Expected result

The scheduler is rendered correctly whatever view modes are set.

Attachments

igScheduler.zip

Target result:
Target rendering

Actual result (failed rendering):
Failed rendering

Console error:
Error in console

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions