Class AutofillActionEndEventArgs
Provides information about the AutofillActionEnd event.
Inherited Members
Namespace: Syncfusion.Blazor.Spreadsheet
Assembly: Syncfusion.Blazor.Spreadsheet.dll
Syntax
public class AutofillActionEndEventArgs
Constructors
AutofillActionEndEventArgs()
Declaration
public AutofillActionEndEventArgs()
Properties
DataRange
Gets the range of cells that contain the original data to be used for the autofill operation.
Declaration
public string DataRange { get; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the qualified range address in the format "SheetName!Range" (e.g., "Sheet1!A1:A10" for multiple cells or "Sheet2!A1" for a single cell). The default value is |
Remarks
This property stores the complete address information of the source cells used for the autofill operation. The address includes:
- The worksheet name, followed by an exclamation mark (!)
- The cell range address in A1 reference style (e.g., "A1:D10" or a single cell like "A1")
This property is especially useful for tracking the source data range and implementing custom autofill behaviors.
Examples
private void OnAutofillActionBegin(AutofillActionBeginEventArgs args)
{
// Get the source range information
string sourceRange = args.DataRange;
Console.WriteLine($"Autofill source data: {sourceRange}");
// Example: Parse the sheet name and range
string[] parts = sourceRange.Split('!');
string sheetName = parts[0];
string cellRange = parts[1];
}
Direction
Gets the direction in which the autofill operation will be performed.
Declaration
public string Direction { get; }
Property Value
| Type | Description |
|---|---|
| string | A string specifying the direction of the autofill operation. Possible values are |
Remarks
This property indicates the direction in which data is being filled during an autofill operation:
"Down"- Autofill is expanding downward from the source range"Right"- Autofill is expanding to the right from the source range"Up"- Autofill is expanding upward from the source range"Left"- Autofill is expanding to the left from the source range
The direction affects how patterns in the data are continued during autofill operations.
Examples
private void OnAutofillActionBegin(AutofillActionBeginEventArgs args)
{
// Check the direction of autofill
if (args.Direction == "Down")
{
Console.WriteLine("Autofill is propagating downward");
}
else if (args.Direction == "Right")
{
Console.WriteLine("Autofill is propagating to the right");
}
// Prevent autofill in certain directions
if (args.Direction == "Up" || args.Direction == "Left")
{
args.Cancel = true;
}
}
FillRange
Gets the range of cells where the data will be autofilled.
Declaration
public string FillRange { get; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the qualified range address in the format "SheetName!Range" (e.g., "Sheet1!A1:A10" for multiple cells or "Sheet2!A1" for a single cell). The default value is |
Remarks
This property stores the complete address information of the destination cells that will receive values during the autofill operation. The address includes:
- The worksheet name, followed by an exclamation mark (!)
- The cell range address in A1 reference style (e.g., "A1:D10" or a single cell like "A1")
This property is useful for identifying the target cells that will be affected by the autofill operation.
Examples
private void OnAutofillActionBegin(AutofillActionBeginEventArgs args)
{
// Get the target range information
string targetRange = args.FillRange;
Console.WriteLine($"Autofill target range: {targetRange}");
}