This sample demonstrates dynamic show hide columns feature of Grid. Select column name from the properties panel and click hide/show to toggle visibility.
Category Name | Product Name | Units In Stock | Discontinued |
---|---|---|---|
Beverages | Chai | 39 | |
Beverages | Chang | 17 | |
Beverages | Chartreuse verte | 69 | |
Beverages | Côte de Blaye | 17 | |
Beverages | Ipoh Coffee | 17 | |
Beverages | Lakkalikööri | 57 | |
Beverages | Laughing Lumberjack Lager | 52 | |
Beverages | Outback Lager | 15 | |
Beverages | Rhönbräu Klosterbier | 125 | |
Beverages | Sasquatch Ale | 111 | |
Beverages | Steeleye Stout | 20 | |
Condiments | Aniseed Syrup | 13 |
Column
|
|
|
|
Hidden Columns
|
|
The Grid column can be showed/hidden dynamically using showColumns and hideColumns method of the Grid. In this demo, the columns can be showed and hidden by selecting the column name in the dropdown and click the Show or Hide buttons to toggle visibility. And the column`s visibility is toggled based on the columns->headerText value. The columns->visible property specifies the visibility of a column. To hide a column at the initial rendering, set the columns->visible property to false.