Skip to content

Commit cb7827c

Browse files
chore(Grid): polish article
1 parent fddeca5 commit cb7827c

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

knowledge-base/grid-conditionally-hide-command-buttons.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,24 @@ res_type: kb
99
ticketid: 1675338
1010
---
1111

12+
## Environment
13+
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>
19+
Grid for Blazor
20+
</td>
21+
</tr>
22+
</tbody>
23+
</table>
24+
1225
## Description
1326
In some scenarios, you might want to conditionally show or hide command buttons in a [Grid for Blazor](slug://grid-overview) based on the data of the current row. For instance, you may want to display a delete button only for items that meet certain criteria. This article demonstrates how to achieve this behavior by using the context of the command column.
1427

15-
This knowledge base article also answers the following questions:
16-
- How can I hide a GridCommandButton based on a row value in Blazor?
17-
- What is the way to conditionally display command buttons in a Telerik Blazor Grid?
18-
- Can I dynamically control the visibility of command buttons in a Grid for Blazor?
19-
2028
## Solution
21-
To conditionally show or hide command buttons in a Grid for Blazor, use the context parameter of the `GridCommandColumn` to access the current row's data. Based on this data, you can conditionally render the command button.
29+
To conditionally show or hide command buttons in a Grid, use the context parameter of the `GridCommandColumn` to access the current row's data. Based on this data, you can conditionally render the command button.
2230

2331
````RAZOR
2432
@CustomCommandResult
@@ -123,8 +131,8 @@ To conditionally show or hide command buttons in a Grid for Blazor, use the cont
123131
````
124132

125133
### Note
126-
If you prefer not to remove the button from the DOM but simply hide it, you can conditionally set the `Class` parameter of the `GridCommandButton` tag and utilize CSS to hide the button.
134+
If you prefer not to remove the button from the DOM but simply hide it, you can conditionally set the `Class` parameter of the `GridCommandButton` tag and use CSS to hide the button.
127135

128136
## See Also
129-
- [Blazor Grid Overview](slug://grid-overview)
130-
- [Blazor Grid Command Column](slug://components/grid/columns/command)
137+
* [Grid Overview](slug://grid-overview)
138+
* [Grid Command Column](slug://components/grid/columns/command)

0 commit comments

Comments
 (0)