Howdy
I am opening a window to display a razor page using the following
function dblClickCalEvent(e) {
var win = $("#scheduleWindow").data("kendoWindow");
win.refresh({
url: "@Url.Page("ScheduleForm", "Details")",
data: { clickDate: e.dataset.clickdate, scheduleId: e.dataset.scheduleid }
});
win.center().open();
}
This opens the Razor page and calls the OnGetDetails and renders the page using the correct Model. I have a MultiSelect on the page using the Select Event which once a value is selected POSTs back to the page using the following:
function attendee_selected(e) {
$.ajax({
type: "POST",
url: "ScheduleForm?handler=AttendAdd",
data: { __RequestVerificationToken: '@token', attendee: e.dataItem.UserPrincipleName }
});
}
Which posts to this:
public async Task<IActionResult> OnPostAttendAdd(string attendee)
And returns Page();
I can see that the model gets populated while debugging the Razor page, however the page never renders the new results on page. I have tried to call a refresh on the window but this has no effect. Here is and example of where the ViewDates change once the Page is returned from the Post method and the changes are not reflected in the page in the window:
<table style="width: 100%;">
<tr>
@foreach (var d in Model.ScheduleAssistaint.ViewDates)
{
<td class="border1" style="text-align:center;">
@d.ToLongDateString()
</td>
}
</tr>
</table>
Is this something to do with the fact the page is inside a window? If so is there a way to fix this?
Thanks