Using a standard scheduler I am attempting to assign multiple resources. However, on submit I am getting a javascript alert error telling me the "someNumber" is invalid, where some number is the Datavalue for resource RegionRes. ("1" is invalid, "2" is invalid. etc)
The following things happen:
The record is processed and inserting into the database.
The edit form does not close.
Upon cancelling out of the edit form the event does not appear on the schedule.
Upon refreshing no events will appear on the schedule.
However, deleting the the offending record(s) from the join table and refreshing the calendar all events appear again.
Here is the scheduler:
I have also tried a bindto using viewdata to no avail.
It is just very odd that it will display the multiselect for edit and insert the event into the database but not display the event.
As usual any help would be appreciated.
Thanks,
Chris
The record is processed and inserting into the database.
The edit form does not close.
Upon cancelling out of the edit form the event does not appear on the schedule.
Upon refreshing no events will appear on the schedule.
However, deleting the the offending record(s) from the join table and refreshing the calendar all events appear again.
Here is the scheduler:
@(Html.Kendo().Scheduler<
SchedulerViewModel
>()
.Name("scheduler")
.Views(views =>
{
views.DayView();
views.WeekView();
views.MonthView(monthView => monthView.Selected(true));
})
.Resources(resource =>
{
resource.Add(r => r.RegionIds)
.Name("RegionsResource")
.Title("RegionsRes")
.DataTextField("RegionName")
.DataValueField("RegionId")
.Multiple(true)
.DataSource(source =>
{
source.Read(read => { read.Action("RegionDropDownList", "DropDownList"); });
});
resource.Add(v => v.VenueId)
.Name("VenuesResource")
.Title("VenueRes")
.DataTextField("VenueName")
.DataValueField("VenueId")
.BindTo((IEnumerable<
VenueViewModel_DDL
>)ViewData["Venues"]);
}
)
.DataSource(d => d.Model(m =>
{
m.Id(f => f.EventId);
m.Field(f => f.Title).DefaultValue("No title");
m.RecurrenceId(f => f.RecurrenceID);
m.Field(f => f.IsAllDay).DefaultValue(false);
})
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
.Events(e => e.Error("error_handler"))
)
.Editable(true)
)
I have also tried a bindto using viewdata to no avail.
It is just very odd that it will display the multiselect for edit and insert the event into the database but not display the event.
As usual any help would be appreciated.
Thanks,
Chris