Class SpreadsheetEvents
Inheritance
Namespace: Syncfusion.Blazor.Spreadsheet
Assembly: Syncfusion.Blazor.Spreadsheet.dll
Syntax
public class SpreadsheetEvents : OwningComponentBase
Constructors
SpreadsheetEvents()
Declaration
public SpreadsheetEvents()
Properties
AutofillActionBegin
Gets or sets an event callback that is raised before an Autofill operation is performed.
Declaration
public EventCallback<AutofillActionBeginEventArgs> AutofillActionBegin { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<AutofillActionBeginEventArgs> | An event callback function that is triggered before an autofill operation. |
Remarks
This event is triggered before an autofill action takes place. The event handler receives a AutofillActionBeginEventArgs object, which provides details of the autofill action.
You can cancel the action by setting the Cancel property to true
.
Examples
<SfSpreadsheet>
<SpreadsheetEvents AutofillActionBegin="OnAutofillActionBegin"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnAutofillActionBegin(AutofillActionBeginEventArgs args)
{
// Prevents the autofill action.
args.Cancel = true;
}
}
AutofillActionEnd
Gets or sets an event callback that is raised after an Autofill operation is performed.
Declaration
public EventCallback<AutofillActionEndEventArgs> AutofillActionEnd { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<AutofillActionEndEventArgs> | An event callback function that is triggered after an autofill operation. |
Remarks
This event is triggered after an autofill action takes place. The event handler receives a AutofillActionEndEventArgs object, which provides details of the autofill action.
Examples
<SfSpreadsheet>
<SpreadsheetEvents AutofillActionEnd="OnAutofillActionEnd"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnAutofillActionEnd(AutofillActionEndEventArgs args)
{
// Implement the logic here.
}
}
ColumnResized
Gets or sets an event callback that is raised when the column resizing ends.
Declaration
public EventCallback<ColumnResizedEventArgs> ColumnResized { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColumnResizedEventArgs> | An event callback function triggered when column resizing is completed. |
Remarks
This event handler receives a ColumnResizedEventArgs object which provides the details of the resized column.
Examples
<SfSpreadsheet>
<SpreadsheetEvents ColumnResized="OnColumnResized"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnColumnResized(ColumnResizedEventArgs args)
{
// Implement the logic here.
}
}
ColumnResizing
Gets or sets an event callback that is raised when column resizing starts.
Declaration
public EventCallback<ColumnResizingEventArgs> ColumnResizing { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColumnResizingEventArgs> | An event callback function triggered when column resizing begins. |
Remarks
This event handler receives a
Examples
<SfSpreadsheet>
<SpreadsheetEvents ColumnResizing="OnColumnResizing"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnColumnResizing(ColumnResizeEventArgs args)
{
// Prevents the column resize.
args.Cancel = true;
}
}
CutCopyActionBegin
Gets or sets an event callback that is raised before the copy or cut operation is performed.
Declaration
public EventCallback<CutCopyActionBeginEventArgs> CutCopyActionBegin { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<CutCopyActionBeginEventArgs> | An event callback function that is triggered before the copy or cut operation. |
Remarks
This event is triggered before the copy or cut action takes place. The event handler receives a CutCopyActionBeginEventArgs object, which provides details of the intended copy or cut action.
You can cancel the action by setting the Cancel property to true
.
Examples
<SfSpreadsheet>
<SpreadsheetEvents CutCopyActionBegin="OnCutCopyActionBegin"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnCutCopyActionBegin(CutCopyActionBeginEventArgs args)
{
// Prevents the cut action.
if (args.Action == "Cut")
{
args.Cancel = true;
}
}
}
HyperlinkClick
Event callback that triggers before a hyperlink is clicked, providing access to the HyperlinkClickEventArgs event arguments.
Declaration
public EventCallback<HyperlinkClickEventArgs> HyperlinkClick { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<HyperlinkClickEventArgs> | An event callback function triggered when a hyperlink is clicked. |
Remarks
This callback enables the implementation of custom logic when a hyperlink is clicked. Properties of the HyperlinkClickEventArgs can be accessed and modified to control hyperlink click behavior.
Examples
<SfSpreadsheet @ref="spreadsheetObj">
<SpreadsheetEvents HyperlinkClick="OnHyperlinkClick"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
private void OnHyperlinkClick(HyperlinkClickEventArgs args)
{
// Implement the logic here.
}
}
HyperlinkCreated
Event callback that triggers after a hyperlink is successfully inserted, providing access to the HyperlinkCreatedEventArgs event arguments.
Declaration
public EventCallback<HyperlinkCreatedEventArgs> HyperlinkCreated { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<HyperlinkCreatedEventArgs> | An event callback function triggered after a hyperlink is created. |
Remarks
This callback enables post-processing actions following hyperlink creation.
It occurs after the hyperlink is inserted and therefore cannot be used to prevent or modify the initial creation process.
To intercept or modify hyperlink creation, use the HyperlinkCreating event instead.
Examples
<SfSpreadsheet @ref="spreadsheetObj">
<SpreadsheetEvents HyperlinkCreated="OnHyperlinkCreated"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
private void OnHyperlinkCreated(HyperlinkCreatedEventArgs args)
{
// Implement the logic here.
}
}
HyperlinkCreating
Event callback that triggers before a hyperlink is inserted, providing access to the HyperlinkCreatingEventArgs event arguments.
Declaration
public EventCallback<HyperlinkCreatingEventArgs> HyperlinkCreating { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<HyperlinkCreatingEventArgs> | An event callback function triggered before inserting a hyperlink. |
Remarks
This callback enables the addition of custom logic prior to hyperlink creation, such as modifying the hyperlink target, or cancelling the creation process entirely. It facilitates interception and potential modification of the hyperlink insertion workflow.
Examples
<SfSpreadsheet @ref="spreadsheetObj">
<SpreadsheetEvents HyperlinkCreating="OnHyperlinkCreating"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
private void OnHyperlinkCreating(HyperlinkCreatingEventArgs args)
{
// Implement the logic here.
}
}
Pasting
Gets or sets an event callback that is raised before the paste operation is performed.
Declaration
public EventCallback<PastingEventArgs> Pasting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<PastingEventArgs> | An event callback function that is triggered before the paste operation. |
Remarks
This event is triggered before the paste action takes place. The event handler receives a PastingEventArgs object, which provides details about the paste operation. You can cancel the paste action by setting the Cancel property to true
.
Examples
<SfSpreadsheet>
<SpreadsheetEvents Pasting="OnPasting"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnPasting(PastingEventArgs args)
{
// Prevents the paste action.
if (args.PasteRange == "A1:B2")
{
args.Cancel = true;
}
}
}
RowResized
Gets or sets an event callback that is raised when the row resizing ends.
Declaration
public EventCallback<RowResizedEventArgs> RowResized { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowResizedEventArgs> | An event callback function triggered when row resizing is completed. |
Remarks
This event handler receives a RowResizedEventArgs object which provides the details of the resized row.
Examples
<SfSpreadsheet>
<SpreadsheetEvents RowResized="OnRowResized"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnRowResized(RowResizedEventArgs args)
{
// Implement the logic here.
}
}
RowResizing
Gets or sets an event callback that is raised when row resizing starts.
Declaration
public EventCallback<RowResizingEventArgs> RowResizing { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RowResizingEventArgs> | An event callback function triggered when row resizing begins. |
Remarks
This event handler receives a RowResizingEventArgs object which provides the details of the resizing row. You can prevent the resize action using Cancel.
Examples
<SfSpreadsheet>
<SpreadsheetEvents RowResizing="OnRowResizing"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnRowResizing(RowResizingEventArgs args)
{
// Prevents the row resize.
args.Cancel = true;
}
}
Selected
Gets or sets an event callback that is raised after a cell or range selection operation is performed in the spreadsheet.
Declaration
public EventCallback<SelectedEventArgs> Selected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<SelectedEventArgs> | An event callback function triggered after the selection operation occurs. |
Remarks
This event is triggered following the selection of a cell or range.
The event handler receives a SelectedEventArgs object containing details about the selection operation.
Examples
<SfSpreadsheet>
<SpreadsheetEvents Selected="OnSelected"></SpreadsheetEvents>
</SfSpreadsheet>
@code {
public void OnSelected(SelectedEventArgs args)
{
// Implement custom logic here.
}
}
Methods
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |