Agenda view event template displying empty v19.3.0.48

Syncfusion version: 19.3.0.48

datasource  _allAppointments does have data populated and SelectedDate="@_selectedValue" also has a value but UI control doesn't display any data. Attached screenshots of datasource and selecteddate.

<Syncfusion.Blazor.Schedule.SfSchedule TValue="AppointmentData" CssClass="custom-cal" SelectedDate="@_selectedValue" SelectedDateChanged="HandleDateSelected" AgendaDaysCount="7" HideEmptyAgendaDays="true" AllowInline="false" AllowDragAndDrop="false" AllowMultiCellSelection="false" AllowMultiRowSelection="false" ShowQuickInfo="false">

                                    <Syncfusion.Blazor.Schedule.ScheduleViews>

                                        <Syncfusion.Blazor.Schedule.ScheduleView Option="Syncfusion.Blazor.Schedule.View.Agenda">

                                            <EventTemplate>

                                                @{

                                                    var item = (AppointmentData)context;


                                                    <div class="row">

                                                        <div class="col-6">@item.Category</div>

                                                        <div class="col-6">Status: @item.Status</div>

                                                    </div>


                                                    <span>@item.DateAndTime.ToString("hh:mm tt") @item.ProviderName</span>                                                         <br />

                                                    <span>@item.AddressLine1</span><br />

                                                    @if (!string.IsNullOrWhiteSpace(item.AddressLine2))

                                                    {

                                                        <span>@item.AddressLine2</span><br />

                                                    }

                                                    <span>@item.City, @item.State @item.ZipCode</span><br />


                                                }

                                            </EventTemplate>

                                        </Syncfusion.Blazor.Schedule.ScheduleView>

                                    </Syncfusion.Blazor.Schedule.ScheduleViews>

                                    <Syncfusion.Blazor.Schedule.ScheduleEventSettings DataSource="_allAppointments" />

 </Syncfusion.Blazor.Schedule.SfSchedule>


Attachment: scheduler_3b8d24a9.zip

3 Replies

SK Satheesh Kumar Balasubramanian Syncfusion Team December 17, 2021 02:03 PM UTC

Hi Tejaswini, 
  
Greetings from Syncfusion Support. 
  
We have validated your reported query based on your shared details and prepared sample to reproduce the reported issue. But agenda view event template is displayed properly at our end. 
  
  
 
  
  
Could you please share the below details to reproduce the issue? This will help to validate the issue and provide prompt solution at earliest. 
  • Replicate the issue in the above sample (or) share issue replicating sample if possible
  • Share issue depicting video

Regards, 
Satheesh Kumar B 



TR Tejaswini Reddy Mara December 20, 2021 02:11 PM UTC

Hello Sateesh,


I was able to reproduce the issue in the provided sample solution. 


Thanks

Tejaswini


Attachment: AgendaViewTemplatezip_a42fbfac.zip


SK Satheesh Kumar Balasubramanian Syncfusion Team December 21, 2021 02:17 PM UTC

Hi Tejaswini, 
  
Thanks for your update. 
  
We have validated your reported query and let you know that you have not used set property in StartTime and EndTime which is the cause for the reported issue. So, we suggest you map the fileds properly in your application. 
  
  
ScheduleData.cs: 
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Threading.Tasks; 
  
namespace ScheduleComponent.Pages 
{ 
    public class ScheduleData 
    { 
        private static DateTime Today = DateTime.Now; 
        private int CurrentYear = Today.Year; 
        public List<WebinarData> GetWebinarData() 
        { 
            List<WebinarData> webinarData = new List<WebinarData>(); 
          
            webinarData.Add(new WebinarData 
            { 
                Id = 2,       
                Subject = "Health Day", 
                Tags = "Reduce mental stress, Follow good food habits", 
                Description = "A day that raises awareness on different health issues. It marks the anniversary of the foundation of WHO.", 
                DateAndTime = new DateTime(CurrentYear, 1, 14, 0, 0, 0), 
                StartTime = new DateTime(CurrentYear, 1, 14, 0, 0, 0), 
                EndTime = new DateTime(CurrentYear, 1, 14, 0, 10, 0), 
                ImageName = "health-day", 
                PrimaryColor = "#357cd2", 
                SecondaryColor = "#5d96db" 
            }); 
          
            return webinarData; 
        } 
  
        public class WebinarData : AppointmentData 
        { 
            public string Tags { get; set; } 
            public string ImageName { get; set; } 
            public string PrimaryColor { get; set; } 
            public string SecondaryColor { get; set; } 
        } 
  
        public class AppointmentData 
        { 
            public DateTime StartTime { get; set; } 
            public DateTime EndTime { get; set; } 
  
            public int Id { get; set; } 
            public string Subject { get; set; } 
            public string Location { get; set; } 
            public string Description { get; set; } 
            public DateTime DateAndTime { get; set; }           
            public Nullable<bool> IsAllDay { get; set; } 
            public string CategoryColor { get; set; } 
            public string RecurrenceRule { get; set; } 
            public Nullable<int> RecurrenceID { get; set; } 
            public Nullable<int> FollowingID { get; set; } 
            public string RecurrenceException { get; set; } 
            public string StartTimezone { get; set; } 
            public string EndTimezone { get; set; } 
        } 
  
    } 
} 
  
Kindly try the above sample and let us know if this meets your requirement. 
  
Regards, 
Satheesh Kumar B 


Loader.
Up arrow icon