Skip to content

Commit c6c7485

Browse files
chore(kb): idea for hiding a column
1 parent acc6789 commit c6c7485

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

knowledge-base/grid-static-group.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ Examples of both follow below, see the code comments for details.
139139
}
140140
````
141141

142+
>caption Sample column declaration so it is not visible in the grid
143+
144+
The key thing is to set `Visible=false`, the other settings are to ensure it cannot be shown, resized, edited, moved or otherwise interracted with. Hiding it from the column chooser will also prevent the user from showing it on their own, the other settings are to showcase you can disable them, and to limit the options in case your other state modifications require that you show it at some point. You can tweak this as necessary.
145+
146+
````CSHTML
147+
<GridColumn Field="@(nameof(SampleData.Team))" Title="Team" Width="0px" VisibleInColumnChooser="false" Visible="false"
148+
Reorderable="false" Resizable="false" Filterable="false" Sortable="false" Groupable="false" Editable="false" Lockable="false">
149+
</GridColumn>
150+
````
151+
142152
>caption Sample CSS rules to hide the group header and/or the [x] buttons on group indicators
143153
144154
````CSHTML

0 commit comments

Comments
 (0)