SAIL Recipes give you an opportunity to explore different interface design patterns. To learn how to directly use SAIL recipes within your interfaces, see Adapt a SAIL Recipe to Work with My Applications.
Conditionally hide a column in a read-only paging grid when all data for that column is a specific value.
In this case, only display the "Department" column when a user has not yet selected a department.
This scenario demonstrates:
- How to conditionally hide a column in a grid based on a user's interaction
- How to use the showWhen parameter in
- How to configure the filter parameter in
Test it out
- Select a department value. Notice that the department column is no longer visible.
Notable Implementation Details
- Department values would typically be stored in a constant or lookup table, not hard-coded in a local variable. This was done to reduce the number of dependencies in this expression.
- A null value is being passed into the filter parameter when no department is selected. When local!selectedDepartment is null, we don't want to be applying a filter to our query.