Changing the CellTemplate depending on the event values in that cell

We have a requirement that we have up to 5 events on each day. Some of these events mean that the day is not available at all anymore and should be visibly changed to a different look. Currently we try to just make a black cross over the complete cell.
This works in general when using the celltemplate but I in the celltemplate I don't have the values of the events inside which I need to consider if the cell is crossed out or not. Is there a way to get all the events in one cell inside the celltemplate?

4 Replies

AO Andreas Oelke November 5, 2020 09:57 AM UTC

I have implemented it now with getting the TemplateContext including the date and checking if this date is in the DataSource and has the crossed out flag and then I set the div in the CellTemplate.
This works fine but it seems the empty cells before and after the valid cells have just random dates which leads to them also having this crossed out div as they supply valid dates in the TemplateContext although they are no dates at all. This seems to be a bug in my opinion and it makes it impossible to achieve what I'm looking for.

Do you have any suggestions on how to ignore the empty cells for the cellTemplate?


BS Balasubramanian Sattanathan Syncfusion Team November 6, 2020 01:03 PM UTC

Hi Andreas, 

Thanks for your update. 

Currently, we are validating your reported scenario at our end and will update the further details on November 9, 2020. We would appreciate your valuable patience until then. 

Regards, 
Balasubramanian S 



AO Andreas Oelke November 24, 2020 06:18 AM UTC

I haven't heard anything back from you until now and would like to ask how we can implement this as it is a mandatory feature for our app.


BS Balasubramanian Sattanathan Syncfusion Team November 25, 2020 04:31 PM UTC

Hi Andreas, 

Sorry for the late reply. 

We have checked your reported scenario and let you know that we will update the details in #304751. Kindly have a follow-up with that incident for further assistance. 

Regards, 
Balasubramanian S 


Loader.
Up arrow icon