Can you describe some use cases that require a Hidden attribute for the Grid command buttons? That is, cases in which Enabled="false" is not a suitable option.
I assume that you know that you can render command buttons with a conditional code block, e.g.
<GridCommandColumn>
@if (!(context as Product).Discontinued)
{
<GridCommandButtonCommand="Edit"Icon="edit">Edit</GridCommandButton>
}
</GridCommandColumn>
Yes, I know that I can use conditions to render, but having such property for GridCommandColumn, TelerikButton makes the code/approach more similar, let say having this sugar will be appreciated :-)
Thx Alex
Dimo
Telerik team
commented on 15 Oct 2021, 05:56 AM
Hey Alex,
I double-checked the Button documentation and the source code. The Hidden property is intended for internal use and that is why it is not documented on purpose. Blazor requires component Parameters to be public, that is why the property is accessible for use.
In other words, you may rely on it if you like, but we still recommend conditional rendering instead, for better future proof-ness.
Hi Aleksandr,
Can you describe some use cases that require a Hidden attribute for the Grid command buttons? That is, cases in which Enabled="false" is not a suitable option.
I assume that you know that you can render command buttons with a conditional code block, e.g.
<GridCommandColumn> @if (!(context as Product).Discontinued) { <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton> } </GridCommandColumn>
Hello Dimo,
Yes, I know that I can use conditions to render, but having such property for GridCommandColumn, TelerikButton makes the code/approach more similar, let say having this sugar will be appreciated :-)
Thx Alex
Hey Alex,
I double-checked the Button documentation and the source code. The Hidden property is intended for internal use and that is why it is not documented on purpose. Blazor requires component Parameters to be public, that is why the property is accessible for use.
In other words, you may rely on it if you like, but we still recommend conditional rendering instead, for better future proof-ness.