ResourceHeaderTemplate on the scheduler not always visible

Hello,

I am encountering an issue with the the scheduler control. Using custom header template for resources, the template sometimes shows and sometimes not.
Could you please review my code and tell me the issue with ?
Thank you


Screenshot 2023-12-25 164304.png


<ejs-schedule currentView="Month"

              id="schedule"

              width="100%"

              enableAdaptiveUI="false"

              resourceHeaderTemplate="#resourceTemplate"

              height="650px"

              cssClass="block-events">


    <e-schedule-group byGroupID="false" resources="@ViewBag.Resources"></e-schedule-group>

    <e-schedule-resources>

        <e-schedule-resource dataSource="@ViewBag.Employees" field="UserId" title="Employees" name="Employees" textField="text" idField="id" colorField="color" allowMultiple="true"></e-schedule-resource>

    </e-schedule-resources>

    <e-schedule-eventsettings allowAdding="false" allowEditing="false" allowDeleting="false" dataSource="@ViewBag.dataSource">

    </e-schedule-eventsettings>

    <e-schedule-views>

        <e-schedule-view option="Month"></e-schedule-view>

    </e-schedule-views>

</ejs-schedule>

<script id="resourceTemplate" type="text/x-template">

    <div class='template-wrap'>

        <div class="resource-details">

            <div class="resource-name">${getDoctorName(data)}</div>

            <div class="resource-designation">${getDoctorLevel(data)}</div>

        </div>

    </div>

</script>


<script type="text/javascript">

    window.getDoctorName = function (value) {

        return (value.resourceData) ? value.resourceData[value.resource.textField] : value.resourceName;

    };


    window.getDoctorImage = function (value) {

        return value.resourceData.externalUserId;

    };


    window.getDoctorLevel = function (value) {

        return value.resourceData.designation;

    };

</script>



3 Replies

VS Venkateshwaran Saravanakumar Syncfusion Team December 26, 2023 12:14 PM UTC

Hi Essaddek,


Based on your query and the provided codes, we have created a Scheduler sample. However, we are unable to reproduce the mentioned issue on our end; the resourceHeaderTemplate displays properly as expected. Please try the shared sample. If you are still facing the issue, kindly provide the following details, as they will greatly help us understand and provide a proper solution:

  • Whether we have missed anything in the sample
  • Share the steps to reproduce the mentioned issue.
  • Provide a video demonstration representing the issue.
  • Provide a simplified sample that replicates the issue or
  • Replicate the issue in our shared sample.






Regards,

Venkatesh


Attachment: AspCoreScheduler_482cb46a.zip


EM Essaddek Mohammed December 27, 2023 08:14 AM UTC

Hello,

Thank you for your feedback, by the way, my code is working, but it stops working on Chrome/Edge if I make a change to either the template or the return of javascript functions. but in Firefox it continues working. I think it's mostly related to cache or something else.

Thanks



VS Venkateshwaran Saravanakumar Syncfusion Team December 28, 2023 01:10 PM UTC

Essaddek,


We would like to know whether you have tried our sample in the mentioned browsers and faced the issue, as it was working fine in the mentioned browsers on our end. If the issue arises with your sample, we also suspect that it might be because of the cache being maintained. So kindly clear the cache and run your sample once again, which might resolve your issue. If you are still facing the issue kindly provide the details we requested in the previous update, as they will greatly help us understand and provide a proper solution.



Loader.
Up arrow icon