Display and hide the dataGrid

Hi I would like to know if it's possible to display and hide the datagrid with the checkbox e.g if the check box is true then the datagrid is displayed.

I tried it but any action work when I change the check false to true

 <RadzenCheckBox Name="CheckBox1" TValue="bool"/> 
            <RadzenDataGrid @ref="gridaction"  Visible =@CheckBox1..../>
@code{
bool CheckBox1;
}

Thank in advance to your support

You need to use @bind-Value for the CheckBox to a bool variable.

Yes right, it works perfectly!! thank you