Class PivotViewCellEditSettings
Provides settings for performing CRUD operations on raw items associated with pivot table cells via an edit dialog data grid.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class PivotViewCellEditSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
Raw items are displayed in a data grid shown as a dialog when a value cell is double-clicked. CRUD operations can be performed using double-click, command columns, or toolbar options.
The following options are available:
AllowAdding: Enables adding new records in the data grid to update related cells in the pivot table.AllowEditing: Enables editing existing records in the data grid to update related cells in the pivot table.AllowDeleting: Enables deleting existing records from the data grid to update related cells in the pivot table.AllowCommandColumns: Adds a command column with built-in buttons for CRUD actions (edit, save, delete, cancel).Mode: Specifies the editing mode used by the data grid. Supported modes are Normal, Dialog, and Batch. The default mode is Normal.AllowEditOnDblClick: Enables initiation of editing by double-clicking a value cell in the pivot table.ShowConfirmDialog: Displays a confirmation dialog to save or discard changes in Batch edit mode.ShowDeleteConfirmDialog: Displays a confirmation dialog before deleting any record from the data grid.
Constructors
PivotViewCellEditSettings()
Declaration
public PivotViewCellEditSettings()
Properties
AllowAdding
Gets or sets a value indicating whether adding new records is allowed in the edit dialog data grid.
Declaration
[Parameter]
[JsonPropertyName("allowAdding")]
public bool AllowAdding { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether adding new records is allowed. The default value is false. |
Remarks
When enabled, new records can be added to the data grid while editing pivot table cells.
This functionality is applicable when AllowEditing is set to true.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings AllowAdding="true" />
</SfPivotView>
AllowCommandColumns
Gets or sets a value indicating whether command columns for built-in actions are displayed in the edit dialog data grid.
Declaration
[Parameter]
[JsonPropertyName("allowCommandColumns")]
public bool AllowCommandColumns { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether command columns are displayed. The default value is false. |
Remarks
When enabled, an additional column is added to the data grid containing buttons for save, edit, delete, and cancel actions, allowing direct performance of CRUD operations.
This feature enhances the editing experience by providing quick access to standard data grid operations without relying solely on toolbar buttons.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings AllowCommandColumns="true" />
</SfPivotView>
AllowDeleting
Gets or sets a value indicating whether deleting records is allowed in the edit dialog data grid.
Declaration
[Parameter]
[JsonPropertyName("allowDeleting")]
public bool AllowDeleting { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether deleting records is allowed. The default value is false. |
Remarks
When enabled, records can be deleted from the data grid, which will update the pivot table's aggregated data accordingly.
This feature requires AllowEditing to be set to true for editing to be initiated.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings AllowDeleting="true" />
</SfPivotView>
AllowEditOnDblClick
Gets or sets a value indicating whether CRUD operations can be initiated by double-clicking a value cell in the pivot table.
Declaration
[Parameter]
[JsonPropertyName("allowEditOnDblClick")]
public bool AllowEditOnDblClick { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether double-clicking enables editing. The default value is true. |
Remarks
When enabled, double-clicking a value cell opens the edit dialog for performing add, edit, or delete operations on the underlying data.
If disabled, other methods must be used to initiate editing, such as toolbar buttons or command columns.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings AllowEditOnDblClick="false" />
</SfPivotView>
AllowEditing
Gets or sets a value indicating whether editing existing records is allowed in the edit dialog data grid.
Declaration
[Parameter]
[JsonPropertyName("allowEditing")]
public bool AllowEditing { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether editing existing records is allowed. The default value is false. |
Remarks
When enabled, existing records in the data grid can be modified, and changes are reflected in the pivot table's aggregated data.
This property must be enabled to allow any CRUD operations, including adding, editing, or deleting records.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings AllowEditing="true" />
</SfPivotView>
AllowInlineEditing
Gets or sets a value indicating whether direct inline editing of a value cell is allowed without opening the edit dialog.
Declaration
[Parameter]
[JsonPropertyName("allowInlineEditing")]
public bool AllowInlineEditing { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether inline editing is enabled. The default value is false. |
Remarks
The inline editing option provides streamlined data modification by allowing direct editing of value cells without opening an external dialog, improving workflow efficiency for quick data updates.
When enabled, value cells can be edited directly in the pivot table if the cell represents a single raw data item.
If the value cell aggregates multiple raw data items, the edit dialog is displayed instead.
This editing mode applies only when a single raw data item corresponds to the value of the cell and works with all editing modes including normal, batch, dialog, and column commands.
Examples
The following example demonstrates how to enable inline editing by setting the AllowInlineEditing property in PivotViewCellEditSettings to true.
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings AllowInlineEditing="true" />
</SfPivotView>
Mode
Gets or sets the edit mode for performing CRUD operations in the edit dialog data grid.
Declaration
[Parameter]
[JsonPropertyName("mode")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public EditMode Mode { get; set; }
Property Value
| Type | Description |
|---|---|
| EditMode | An EditMode specifying the mode of editing. The available modes are Normal, Dialog, and Batch. The default value is Normal. |
Remarks
This setting determines how data editing is performed in the grid opened during cell editing.
- Normal: Normal edit mode allows editing one row at a time in the editing dialog with simple data changes and updates. In normal edit mode, when editing begins, the selected row changes to edit state. Cell values can be modified and saved to the data source by clicking the "Update" toolbar button.
- Dialog: Dialog edit mode provides a focused editing environment by displaying the selected row data in an exclusive dialog window, ensuring clear visibility and controlled data modification. In dialog edit mode, when editing begins, the currently selected row data appears in a dedicated dialog. Cell values can be modified and saved to the data source by clicking the "Save" button in the dialog.
- Batch: Batch editing enables making multiple changes to data grid cells and saving them all at once, improving efficiency for bulk updates. When any data grid cell is double-clicked in batch mode, the target cell changes to edit state. Multiple changes can be performed and all modifications (added, changed, and deleted data) can be saved to the data source by clicking the Update toolbar button.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings Mode="EditMode.Batch" />
</SfPivotView>
ShowConfirmDialog
Gets or sets a value indicating whether a confirmation dialog is shown to save or discard changes when using batch edit mode.
Declaration
[Parameter]
[JsonPropertyName("showConfirmDialog")]
public bool ShowConfirmDialog { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the save/discard confirmation dialog is displayed. The default value is true. |
Remarks
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings ShowConfirmDialog="true" Mode="EditMode.Batch" />
</SfPivotView>
ShowDeleteConfirmDialog
Gets or sets a value indicating whether a confirmation dialog is shown before deleting records from the edit dialog data grid.
Declaration
[Parameter]
[JsonPropertyName("showDeleteConfirmDialog")]
public bool ShowDeleteConfirmDialog { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether to display the delete confirmation dialog. The default value is false. |
Remarks
When enabled, a confirmation prompt appears before any delete operation, helping to prevent accidental data loss.
The ShowDeleteConfirmDialog property supports all edit modes, including Normal, Dialog, and Batch.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewCellEditSettings ShowDeleteConfirmDialog="true" />
</SfPivotView>
Methods
Dispose()
Dispose the unmanaged resources.
Declaration
public virtual void Dispose()
Dispose(bool)
Dispose unmanaged resources in the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Boolean value to dispose the object. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |