Hi Soren,
Thanks for contacting Syncfusion support.
We suggest you to bind a property for the GridColumn’s Visible property. And modify the value for the property to dynamically hide or show the Grid column based on your requirement. Please use the code below,
|
<EjsButton @onclick="onclick">Hide Cols</EjsButton>
@code{
public List<Order> Orders { get; set; }
public bool ShipCountryVisible = true; //Initially the value is true, and the column will be displayed.
public void onclick()
{
ShipCountryVisible = false; //Dynamically change the visibility for the ShipCountry column when button is clicked.
}
...
} |
Please get back to us if you need further assistance.
Regards,
Renjith Singh Rajendran.