How to hide the Save Button and Change text from Cancel in Blazor Grid?

Answer:

By using the FooterTemplate feature of GridEditSettings, the Footer part of Edit Dialog can be customized. As an example, a Switch control is used to render the Save button as well as the text of the Close / Cancel Button. Here is the code snippet for reference.

<SfSwitch @ref="Switch" TChecked="bool">SfSwitch> <SfGrid @ref="Grid" DataSource="@Orders" AllowPaging="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" Height="315"> <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Dialog"> <FooterTemplate> @if (Switch.Checked) { <SfButton OnClick="@Cancel">CloseSfButton> } else { <SfButton OnClick="@Save" IsPrimary="true">SaveSfButton> <SfButton OnClick="@Cancel">CancelSfButton> } FooterTemplate> GridEditSettings> <GridColumns>.. . .

.. GridColumns>SfGrid>


Refer to the UG documentation for reference.

Loader.
Up arrow icon