Avoid separate Datasource for Block Appointments

Hi,
as far as I can see, block appointments share most if not all properties of a normal appointment, with the exception of "Blockappointment" from the sample.

Could I not simply add a boolean field "isBlockAppointment" to my appointments (obtained through an URL adaptor) and use the same source for both types of appointment, without a separate hit to the server?
<e-blockout-settings enable="true" datasource="@ViewBag.blockData" id="Id" subject="Subject" start-time="StartTime" end-time="EndTime" resource-id="OwnerId" is-all-day="AllDay" is-block-appointment="BlockAppointment"></e-blockout-settings>

1 Reply

NR Nevitha Ravi Syncfusion Team November 14, 2017 02:54 PM UTC

Hi Stefan, 

Thank you for contacting Syncfusion Support. 

Yes, it is possible to assign same datasource to block appointments and normal appointments and for the same we have prepared a sample for your reference which can be viewed from the below link. 


<Code> 
<ej-schedule id="Schedule1" width="100%" height="525px" current-date="new DateTime(2017, 6, 5)" current-view="Day"> 
        <e-blockout-settings enable="true" datasource="@ViewBag.appointments" id="Id" subject="Subject" start-time="StartTime" end-time="EndTime" is-all-day="AllDay" is-block-appointment="BlockAppointment"></e-blockout-settings> 
        <e-appointment-settings datasource="@ViewBag.appointments" subject='"Subject"' start-time='"StartTime"' end-time='"EndTime"' all-day='"AllDay"' recurrence='"Recurrence"' recurrence-rule='"RecurrenceRule"'> 
        </e-appointment-settings> 
</ej-schedule> 
</Code> 

Note: The appointments will render both as block and normal appointments. Therefore, we recommend to use individual datasource for block and normal appointments. 

Regards, 
Nevitha. 


Loader.
Up arrow icon