Bind to a nested model

In C# I have the following class defined 

class HomeViewModel
{

   public Entry[] Items {get;set; }
}

class ItemViewModel
{

      public EntryViewModel Entry { get; set;}
}

class EntryViewModel
{

   public string Title { get; set; }

   public string Location { get; set; }

   public string Details { get; set; }

   public DateTime StartTime { get; set; }

   public DateTime EndTime { get; set; }
}


 <e-schedule-eventsettings dataSource="@Model.Items">
     <e-eventsettings-fields>
         <e-field-subject name="Entry.Title" title="Summary"></e-field-subject>
         <e-field-location name="Entry.Location" title="Source"></e-field-location>
         <e-field-description name="Entry.Details" title="Comments"></e-field-description>
         <e-field-starttime name="Entry.StartTime" title="Arrival Time"></e-field-starttime>
         <e-field-endtime name="Entry.EndTime" title="Departure Time"></e-field-endtime>
     </e-eventsettings-fields>
 </e-schedule-eventsettings>


How can I make the data binding work with the child Entry property?



1 Reply

SR Swathi Ravi Syncfusion Team October 25, 2024 09:28 AM UTC

Hi AnilaCar,

 

Thank you for contacting us, and we’re glad to assist you.

 

We would like to inform you that nested models are not supported in the Scheduler. Please use a simple model when assigning data to the Scheduler

Regards,
Swathi


Loader.
Up arrow icon