Using a button to show and hide a card within a GroupHeaderTemplate

I have a RadzenDataGrid which utilises the GroupHeaderTemplate. Within that template I have a button and a card which contains further information that I want to display. The card is not visible by default but I would like it so that when the user clicks on the button the card is displayed.
How could I achieve this? Thanks in advance

You can toggle boolean page property from false to true on the Button Click event and bind Visible property of the Card to that property.

Unfortunately that makes every card visible in every GroupHeaderTemplate. I only want to show the card that is in the same GroupHeaderTemplate as the button

In this case you need a dictionary for page property instead of simple boolean where you can keep boolean value per group. Use the GroupHeaderTemplate context for key.

Do you have an example of an implementation of this?

I’m afraid that I don’t have such example however it should be fairly easy for you. In Page Load create a new property with value new Dictionary<object,bool>(), use ContainsKey() and indexer for Card Visible property expression and pass context as I already suggested in my previous reply. Add new value to the dictionary on Button Click again using context and desired boolean value.

Okay, thanks for your help