Cast Context into custom class

Hi Syncfusion Team,

When I upgraded our Syncfusion library to the latest one, this particular bit of code is not working anymore:

<Template Context="eventContext">

                  @{

                     var calendarEvent = (eventContext as CalendarEvent);         

                  }

               </Template>

The calendarEvent variable is now returning null. Previously this bit of code works OK. How do we cast the context variable into our custom class as previously coded?

Thanks!


2 Replies

AK Alagumeena Kalaiselvan Syncfusion Team October 5, 2021 04:31 PM UTC

Hi Denzel, 

Thanks for contacting Syncfusion support. 

Currently we are checking your reported query and we will update the further details on tomorrow 6th October, 2021. 

Regards 
Alagumeena.K 



AK Alagumeena Kalaiselvan Syncfusion Team October 6, 2021 03:31 PM UTC

Hi Denzel, 
  
We have checked your reported query in Gantt with shared sample code but we could not noticed any issues at our end. So, we have prepared sample based on your shared code which can be get by below link. 
  
Please share the below details to look into this issue further 
  • Replicate your issue in shared sample
  • What kind of template used in your sample
  
Regards 
Alagumeena.K 


Loader.
Up arrow icon