Blank Events In +n More Popup When Using Template

This is similar to Thread Id 149323 where Kevin Greene raised the problem and you said "The reported issue is already a known issue and will be fixed in our weekly patch release scheduled on the end of November, 2019".

I don't think that was about a Blazor component but mine is.

I use Visual Studio Extensions so to the best of my knowledge, my components are all up-to-date.

At the moment I am cancelling the args so the user cannot see these blank events but would like a proper solution.

8 Replies 1 reply marked as answer

NR Nevitha Ravi Syncfusion Team November 10, 2020 06:54 AM UTC

Hi Ian, 

Greetings from Syncfusion Support. 

We have checked for the reported issue “Blank events in more indicator popup when using template” and couldn’t  replicate the issue. Please refer the following sample.  

<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate"> 
    <ScheduleEventSettings DataSource="@DataSource"> 
        <Template> 
            <div>Test</div> 
        </Template> 
    </ScheduleEventSettings> 
</SfSchedule> 


 

If the issue persist still at your end, kindly share the following details. 
  • What are the views you are using
  • Share the template related code
  • Try to reproduce the issue in the above sample
  • Or share your issue replicating sample (if possible)
  • Share image or video reference depicting the issue

Regards, 
Nevitha 



IA Ian November 10, 2020 07:27 PM UTC

Thank you for your reply.  I had no idea there is an item called Template.  I've searched your Scheduler documentation and find no mention of it.
Your sample works perfectly but I am failing to incorporate it into my code.  This may be partly because I have yet to understand the hierarchy of the components, if there is one.

I have a custom adaptor in ScheduleEventSettings.  TValue is not per your examples but is a data model I use and works before I try to add Template.  I did have it on its own inside SfSchedule but see your custom adaptor examples show it inside ScheduleEventSettings so I have moved it there.

but with Template included, I get no data, as public override object Read(DataManagerRequest dataManagerRequest, string key = null) is never called.

If I surround Template with ScheduleField or surround ScheduleField with Template then it causes an error

The following causes no error but produces no data as public override object Read(DataManagerRequest dataManagerRequest, string key = null) is never called..


For completeness, I show as much of SfSchedule as I can get into a screen grab.



Can you please advise me the correct placing for these items?


NR Nevitha Ravi Syncfusion Team November 11, 2020 06:44 AM UTC

Hi , 

Thanks for sharing the details. 

We have checked the reported issue at our end and could replicate the issue “view-wise template not working in more indicator popup”. We confirm this issue as defect and logged the bug report which can be tracked using the following link. The issue fix will be included in our upcoming weekly patch release scheduled on November 17, 2020. 


Also, you can use event template applicable for all the views which can be used within EventSettings as in our previously shared sample. If you use SfDataManager and ScheduleField tag, you need to use them within ChildContent to avoid the reported issue. Please refer the following code and sample. 
    <ScheduleEventSettings TValue="AppointmentData"> 
        <Template> 
            <div>Test</div> 
        </Template> 
        <ChildContent> 
            <ScheduleField Id="TravelId"> 
                <FieldDescription Validation="@DescriptionValidationRules"></FieldDescription> 
            </ScheduleField> 
            <SfDataManager AdaptorInstance="@typeof(CustomAdaptor)" Adaptor="Adaptors.CustomAdaptor"></SfDataManager> 
        </ChildContent> 
    </ScheduleEventSettings> 

Regards, 
Nevitha 


Marked as answer

IA Ian November 11, 2020 12:18 PM UTC

Thanks for your quick response.
Using your code, I can now make the More Events popup display a number of previously hidden events but when I click on any of them it causes the following error:-

Error: System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Blazor.Schedule.Internal.MoreEventPopup`1.OnEventClick(Guid eventGuid) at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

I assume I am supposed to have some code to load the Editor but neither of the events triggred such as

MoreEventsClicked(MoreEventsClickArgs args) 

nor 

OnPopupOpen(PopupOpenEventArgs<Models.BookingVM> args) args.Type == PopupType.EventContainer 

have args that offer anything to do this.

Can you tell me how to make the Month and Year Event Container display data as seen in Day or Week views or navigate to the appropriate date in Day or Week view?

Many thanks.


NR Nevitha Ravi Syncfusion Team November 12, 2020 09:51 AM UTC

Hi Ian, 

Thanks for your update. 

We have checked the reported issue and could replicate the issue, we will resolve the issue along with the previously reported issue and the fix will be included in our upcoming weekly patch release scheduled on November 17, 2020. We would appreciate your patience until then. 

Regards, 
Nevitha 



NR Nevitha Ravi Syncfusion Team November 17, 2020 12:09 PM UTC

Hi Ian, 

Thanks for being patience. 

The issue “view wise template not working in more indicator popup” has been resolved, please upgrade to latest version to avail the fix. 


Please get back to us if you need any further assistance. 

Regards, 
Nevitha 



IA Ian November 26, 2020 12:37 AM UTC

Hi,
This is great.  It works.  I've been able to delete masses of code when I was trying anything to make this work.
Thank you.


NR Nevitha Ravi Syncfusion Team November 26, 2020 04:53 AM UTC

Hi Ian, 

You are most welcome, please get back to us if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Up arrow icon