Hi Alex,
We tried with the same scenario and also with the same
fields, but we were unable to get your reported issue. Could you please confirm
whether you are facing issue in displaying any of the data back to the schedule
such as both the normal and blockout appointments or only facing problem in
displaying blocked appointments alone? We have checked the rendering of both
the appointments at our end and it is getting displayed properly in
Schedule and for the same, we have prepared the working video demo, which can
be downloaded from the following location.
Video demo: http://www.syncfusion.com/downloads/support/forum/137205/ze/ScheduleBlockOutRendering-1546422417
Ensured Sample: http://www.syncfusion.com/downloads/support/forum/137205/ze/ScheduleSampleBlockAppLOD-199364829
Kindly check with the above sample once and if you still
facing the same issue, kindly revert back to us with some more details about
the complete control rendering code or other reproducing steps of this issue in
the above sample. The information provided by you will be more helpful for us
to analyze your reported scenario and provide you back with the possible
solution.
Regards,
Velmurugan
Hi Alex,
Thanks for your update.
We have analyzed our given code example and suspecting that
the reason for the issue is passing the blockout settings data source value
wrongly (passing blockout model settings values instead of blockout data source
alone to the blockoutSettings.dataSource). Therefore, we request you to change
the code example of passing the blockout settings dataSource value. Please
refer to the following code example to overcome this issue.
<Code>
function BlockAppointment(args) {
if (args.requestType == "viewNavigate" || args.requestType
== "dateNavigate" || args.requestType
== "dataBound") {
var proxy = $("#Schedule1").data("ejSchedule");
var dataManager =
ej.DataManager({
url: '@Url.Action("GetBlockData", "Home")',
adaptor: new ej.UrlAdaptor(),
crossDomain: true
});
var query =
ej.Query().addParams("CurrentView", proxy.currentView()).addParams("CurrentDate",
proxy.currentDate());
var promise =
dataManager.executeQuery(query);
promise.done(function (result) {
proxy.model.blockoutSettings.dataSource
= result.result.result;
// Here
need to pass the datasource value alone instead of blockoutSettings model
values
proxy._renderBlockAppointments();
});
}
}
</Code>
We regret for the inconvenience caused as we have provided
the sample with the above highlighted line on 26th April, 2018
update, but while mentioning the code example in that reply, along with this
sample wrongly mentioned as “proxy.model.blockoutSettings.dataSource =
result.result” instead of “proxy.model.blockoutSettings.dataSource =
result.result.result” and this may misguided you to get the above reported
issue.
Kindly try with the above changes and let us know if it
resolves the reported problem as well as if you need any further assistance on
this.
Regards,