Class GridEditSettings
Configures grid edit settings.
Inherited Members
Namespace: Syncfusion.Blazor.Grids
Assembly: Syncfusion.Blazor.dll
Syntax
public class GridEditSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
GridEditSettings()
Declaration
public GridEditSettings()
Properties
AllowAdding
If AllowAdding is set to true, new records can be added to the Grid.
Declaration
[Parameter]
public bool AllowAdding { get; set; }
Property Value
| Type |
|---|
| bool |
AllowDeleting
If AllowDeleting is set to true, existing record can be deleted from the Grid.
Declaration
[Parameter]
public bool AllowDeleting { get; set; }
Property Value
| Type |
|---|
| bool |
AllowEditOnDblClick
If AllowEditOnDblClick is set to false, Grid will not allow editing of a record on double click.
Declaration
[Parameter]
public bool AllowEditOnDblClick { get; set; }
Property Value
| Type |
|---|
| bool |
AllowEditing
If AllowEditing is set to true, values can be updated in the existing record.
Declaration
[Parameter]
public bool AllowEditing { get; set; }
Property Value
| Type |
|---|
| bool |
AllowNextRowEdit
If allowNextRowEdit is set to true, editing is done to next row. By default allowNextRowEdit is set to false.
Declaration
[Parameter]
public bool AllowNextRowEdit { get; set; }
Property Value
| Type |
|---|
| bool |
Dialog
Defines the dialog params to edit.
Declaration
[Parameter]
public DialogSettings Dialog { get; set; }
Property Value
| Type |
|---|
| DialogSettings |
FooterTemplate
Defines the custom footer for the edit dialog.
Declaration
[Parameter]
public RenderFragment<object> FooterTemplate { get; set; }
Property Value
| Type |
|---|
| RenderFragment<object> |
Remarks
The parameters passed to the templates can be accessed using implicit parameter named context.
The context is of type TValue of the grid.
HeaderTemplate
Defines the custom header for the edit dialog.
Declaration
[Parameter]
public RenderFragment<object> HeaderTemplate { get; set; }
Property Value
| Type |
|---|
| RenderFragment<object> |
Remarks
The parameters passed to the templates can be accessed using implicit parameter named context.
The context is of type TValue of the grid.
Mode
Defines the mode to edit. The available editing modes are:
- NormalDefault. Editing is done in an inline form. Edit form is rendered inline as one of the table rows.
- DialogEditing is done in a Dialog/Pop component.
- BatchEnables cell editing. Multiple cells can be edited, added or deleted and saved.
Declaration
[Parameter]
public EditMode Mode { get; set; }
Property Value
| Type |
|---|
| EditMode |
NewRowPosition
Defines the position of adding a new row. The available position are:
- TopDefault. Add form is placed at the first row of the grid.
- BottomAdd form is placed at the last row of the grid
Declaration
[Parameter]
public NewRowPosition NewRowPosition { get; set; }
Property Value
| Type |
|---|
| NewRowPosition |
ShowAddNewRow
Gets or sets a value indicating whether to display a new blank row during grid initialization, facilitating the addition of new records.
Declaration
[Parameter]
public bool ShowAddNewRow { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
By default, the new blank row is displayed at the top of the grid content. A new blank row can be displayed either at the top or bottom of the corresponding page, depending on the setting of the NewRowPosition property.
However, it's important to note that the ShowAddNewRow property solely pertains to the display of a new blank row in the Normal editing mode.
If the AllowAdding property is set to false, the new blank row will be disabled.
Additionally, if any of the grid column's AllowAdding properties is set to false, the corresponding column cell will also be disabled.
ShowConfirmDialog
If ShowConfirmDialog is set to false, confirm dialog does not show when batch changes are saved or discarded.
Declaration
[Parameter]
public bool ShowConfirmDialog { get; set; }
Property Value
| Type |
|---|
| bool |
ShowDeleteConfirmDialog
If ShowDeleteConfirmDialog is set to true, confirm dialog will show delete action. You can also cancel delete command.
Declaration
[Parameter]
public bool ShowDeleteConfirmDialog { get; set; }
Property Value
| Type |
|---|
| bool |
Template
Defines the custom content and edit elements for the edit dialog.
Declaration
[Parameter]
public RenderFragment<object> Template { get; set; }
Property Value
| Type |
|---|
| RenderFragment<object> |
Remarks
The parameters passed to the templates can be accessed using implicit parameter named context.
The context is of type TValue of the grid.
Validator
Defines the custom validator component for the built-in EditForm. Use this to override built-in validation components.
Declaration
[Parameter]
public RenderFragment<object> Validator { get; set; }
Property Value
| Type |
|---|
| RenderFragment<object> |
Remarks
The parameters passed to the templates can be accessed using implicit parameter named context.
The context is of type ValidatorTemplateContext.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type |
|---|
| Task |