You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md
+2-37Lines changed: 2 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,42 +12,7 @@ A cell range is a set of selected cells in a Spreadsheet, typically specified us
12
12
13
13
## Cell formatting
14
14
15
-
Cell formatting enhances the visual presentation of data by applying styles such as font changes, colors, borders, and alignment to individual cells or cell ranges. This helps organize content and emphasize important information for faster interpretation.
16
-
17
-
Cell formatting options include:
18
-
19
-
***Bold** - Applies a heavier font weight to make the text stand out in the Spreadsheet.
20
-
21
-
***Italic** - Slants the text to give it a distinct look, often used for emphasis or to highlight differences.
22
-
23
-
***Underline** - Adds a line below the text, commonly used for emphasis or to indicate hyperlinks.
24
-
25
-
***Strikethrough** - Draws a line through the text, often used to show completed tasks or outdated information.
26
-
27
-
***Font Family** - Changes the typeface of the text (e.g., Arial, Calibri, Times New Roman, and more) to enhance readability or visual appeal.
28
-
29
-
***Font Size** - Adjusts the size of the text to create visual hierarchy or improve readability in the Spreadsheet.
30
-
31
-
***Font Color** - Changes the color of the text to improve visual hierarchy or to organize information using color codes.
32
-
33
-
***Fill Color** - Adds color to the cell background to visually organize data or highlight important information.
34
-
35
-
***Horizontal Alignment** - Controls the position of text from left to right within a cell. Options include:
36
-
***Left** - Default for text
37
-
***Center** - Useful for headings
38
-
***Right** - Default for numbers
39
-
40
-
***Vertical Alignment** - Controls the position of text from top to bottom within a cell. Options include:
41
-
***Top** – Aligns content to the top of the cell
42
-
***Middle** – Centers content vertically
43
-
***Bottom** – Default alignment
44
-
45
-
***Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. To enable text wrapping:
46
-
1. Select the target cell or range (e.g., C5).
47
-
2. Go to the Home tab.
48
-
3. Click Wrap Text in the ribbon to toggle text wrapping for the selected cells.
49
-
50
-
Cell formatting can be applied or removed from a cell or range by using the options available in the component's built-in **Ribbon** under the **Home** tab.
15
+
To know more about cell formatting, refer [here](./formatting#text-and-cell-formatting).
51
16
52
17
## Autofill
53
18
@@ -164,7 +129,7 @@ The event uses the [AutofillActionBeginEventArgs](https://help.syncfusion.com/cr
164
129
{% endhighlight %}
165
130
{% endtabs %}
166
131
167
-
**AutofillActionEnd**
132
+
### AutofillActionEnd
168
133
169
134
The `AutofillActionEnd` event is triggered after an autofill operation has been successfully completed. This event provides detailed information about the completed autofill action, enabling further processing or logging if required.
Copy file name to clipboardExpand all lines: Document-Processing/Excel/Spreadsheet/Blazor/editing.md
+99Lines changed: 99 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,105 @@ To exit edit mode without saving changes, press the **ESCAPE** key. This action
84
84
85
85

86
86
87
+
## Events
88
+
89
+
The Blazor Spreadsheet component provides events that are triggered during editing operations, such as [CellEditing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CellEditingEventArgs.html) and [CellSaved](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CellSavedEventArgs.html). These events allow you to perform custom actions before a cell enters edit mode and after its value has been successfully saved, enabling scenarios such as data validation or logging changes.
90
+
91
+
### CellEditing
92
+
93
+
The `CellEditing` event is triggered before a cell enters edit mode. It provides an opportunity to validate or cancel the edit operation.
94
+
95
+
**Purpose**
96
+
97
+
This event is useful for scenarios where cell editing needs to be controlled dynamically, such as restricting editing in specific ranges or preventing editing based on certain conditions.
98
+
99
+
**Event Arguments**
100
+
101
+
The event uses the [CellEditingEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CellEditingEventArgs.html) class, which includes the following properties:
102
+
103
+
| Event Arguments | Description |
104
+
|---|---|
105
+
| RowIndex (read-only)| The zero-based row index of the cell being edited. |
106
+
| ColIndex (read-only)| The zero-based column index of the cell being edited. |
107
+
| Address (read-only)| The address of the cell being edited (e.g., "Sheet1!A1"). |
108
+
| Value (read-only)| The current value of the cell before editing. |
109
+
| Cancel | Set to `true` to cancel the editing operation. |
The `CellSaved` event is triggered after a cell’s value has been successfully saved, providing details about the updated value and the action that caused the change (such as Edit, Cut, Paste, or Autofill).
144
+
145
+
**Purpose**
146
+
147
+
This event is useful for scenarios where post-editing actions are needed, such as logging the cell change or refreshing the UI.
148
+
149
+
**Event Arguments**
150
+
151
+
The event uses the [CellSavedEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CellSavedEventArgs.html) class, which includes the following properties:
152
+
153
+
| Event Arguments | Description |
154
+
|---|---|
155
+
| Address (read-only)| The address of the cell whose value was saved (e.g., "Sheet1!A1"). |
156
+
| Value (read-only)| The new value of the cell after saving. |
157
+
| OldValue (read-only)| The original value of the cell before saving. |
158
+
| Action (read-only)| The action that triggered the save (e.g., "Edit", "Cut", "Paste", "Autofill"). |
// Log the cell change, including the action that triggered it.
180
+
Console.WriteLine($"Cell {args.Address} changed from '{args.OldValue}' to '{args.Value}' by {args.Action}.");
181
+
}
182
+
}
183
+
{% endhighlight %}
184
+
{% endtabs %}
185
+
87
186
## Cell editing in protected sheet
88
187
89
188
In a protected sheet, only unlocked ranges can be edited based on the sheet's protection settings. Attempting to modify a locked range triggers an error message, as shown below:
title: Events in Blazor Spreadsheet Component | Syncfusion
4
+
description: Checkout and learn about the events in Syncfusion Blazor Spreadsheet component and more | Syncfusion.
5
+
platform: document-processing
6
+
control: Spreadsheet
7
+
documentation: ug
8
+
---
9
+
10
+
# Events in Blazor Spreadsheet Component
11
+
12
+
The Blazor Spreadsheet component provides various events that allow you to interact with the component and customize its behavior.
13
+
14
+
| Event Name | Description |
15
+
|---|---|
16
+
|[AutofillActionBegin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.AutofillActionBeginEventArgs.html)| Triggers when an autofill operation starts. To know more about this event, refer [here](./cell-range#autofillactionbegin). |
17
+
|[AutofillActionEnd](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.AutofillActionEndEventArgs.html)| Triggers when an autofill operation completes. To know more about this event, refer [here](./cell-range#autofillactionend). |
18
+
|[BeforeSave](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.BeforeSaveEventArgs.html)| Triggers just before the workbook is saved. |
19
+
|[CellEditing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CellEditingEventArgs.html)| Triggers when a cell enters edit mode. To know more about this event, refer [here](./editing#cellediting). |
20
+
|[CellSaved](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CellSavedEventArgs.html)| Triggers when a cell's value is saved. To know more about this event, refer [here](./editing#cellsaved). |
21
+
|[ColumnResizing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.ColumnResizingEventArgs.html)| Triggers when a column is being resized. |
22
+
|[CutCopyActionBegin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CutCopyActionBeginEventArgs.html)| Triggers when a cut or copy operation starts. To know more about this event, refer [here](./clipboard#cutcopyactionbegin). |
23
+
|[HyperlinkClick](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkClickEventArgs.html)| Triggers when a hyperlink is clicked. To know more about this event, refer [here](./hyperlink#hyperlinkclick). |
24
+
|[HyperlinkCreated](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatedEventArgs.html)| Triggers when a hyperlink is successfully added. To know more about this event, refer [here](./hyperlink#hyperlinkcreated). |
25
+
|[HyperlinkCreating](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatingEventArgs.html)| Triggers when a hyperlink is being created. To know more about this event, refer [here](./hyperlink#hyperlinkcreating). |
26
+
|[Pasting](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.PastingEventArgs.html)| Triggers when a paste operation starts. To know more about this event, refer [here](./clipboard#pasting). |
27
+
|[RowResizing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.RowResizingEventArgs.html)| Triggers when a row is being resized. |
28
+
|[Selected](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SelectedEventArgs.html)| Triggers when a cell or range of cells is selected. |
29
+
|[WorksheetAdding](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.WorksheetAddingEventArgs.html)| Triggers before a new worksheet is added. |
0 commit comments