How to use the Event Template with Remote data?

Hello!

I'd like to have a custom display of the events on my Scheduler and at the same time use a remote data source, but both of them are configured inside the <ScheduleEventSettings> tag.

Image_4666_1693431591799

It causes the following message:

Image_9610_1693431770492

Is there a way to use a custom template for the events and still use the remote data?


Thanks,


1 Reply 1 reply marked as answer

VS Venkateshwaran Saravanakumar Syncfusion Team August 31, 2023 03:18 PM UTC

Hi Eduardo,


We investigated the problem you mentioned, and we recommend that you address it by rendering SfDatamanger inside ChildContent tag as shown in the code’s snippet below. We have produced a sample for the same, which is available from the project that is linked.


[Index.razor]


<SfSchedule TValue="AppointmentData" Height="550px" @bind-SelectedDate="@currentDate" @bind-CurrentView="@currentView" Readonly="true">

    <ScheduleEventSettings TValue="AppointmentData">

        <ChildContent>

            <SfDataManager Url=https://blazor.syncfusion.com/services/production/api/schedule Adaptor="Adaptors.WebApiAdaptor">

            </SfDataManager>

        </ChildContent>

        <Template>

            @{

                var data = (context as AppointmentData);

                <div class="template-wrap">

                    <div class="subject">Subject: @(data?.Subject)</div>

                    <div>StartTime: @(data?.StartTime)</div>

                    <div>EndTime:  @(data?.EndTime)</div>

                </div>

            }

        </Template>

    </ScheduleEventSettings>

</SfSchedule>



Regards,

Venkatesh


Attachment: BlazorScheduler_edf66f70.zip

Marked as answer
Loader.
Up arrow icon