Hello
I'm having an issue trying to bind my SignalR DataSource to the CRUD methods in my SignalR hub. Can you tell me where I am going wrong? When debugging the ScdLoad method isn't hit. However when this does work when it is a KendoGrid
My hub:
My View:
I'm having an issue trying to bind my SignalR DataSource to the CRUD methods in my SignalR hub. Can you tell me where I am going wrong? When debugging the ScdLoad method isn't hit. However when this does work when it is a KendoGrid
My hub:
01.public IEnumerable<LogSchedulerModel> ScdLoad() {02. var logs = _entityProvider.QueryLogs(x => x.Where(l => l.CheckInExpected > DateTime.Now));03. var scdLogs = logs.Select(log => new LogSchedulerModel04. {05. ID = log.ID, 06. CheckInExpected = log.CheckInExpected, 07. StartDate = log.StartDate, 08. CheckInActual = log.CheckInActual, 09. ContactNumber = log.ContactNumber, 10. UserName = log.UserName, 11. Location = log.UserName, 12. Start = log.StartDate, 13. End = log.CheckInExpected, 14. EmergencyContactName = log.EmergencyContactName, 15. EmergencyContactNo = log.EmergencyContactNo16. });17. 18. return scdLogs;19. }My View:
@(Html.Kendo().Scheduler<LogSchedulerModel>() .Name("scheduler") .Date(DateTime.Now) .StartTime(DateTime.Now) .Height(600) .Views(views => { views.DayView(); views.WorkWeekView(workWeekView => workWeekView.Selected(true)); views.WeekView(); views.MonthView(); views.AgendaView(); }) .DataSource(source => source .SignalR() .Events(events => events.Push(@<text> function(e) { var notification = $("#notification").data("kendoNotification"); notification.success(e.type); } </text>)) .Transport(tr => tr .Promise("hubStart") .Hub("hub") .Client(c => c .Create("scdcreate") .Read("scdload") .Update("scdupdate") .Destroy("scddestroy") ) .Server(s => s .Create("scdcreate") .Read("scdload") .Update("scdupdate") .Destroy("scddestroy") )) .Schema(schema => schema .Model(model => { model.Id(m => m.ID); model.Field(m => m.ID).Editable(true); }) ) )
)