Class SelectedEventArgs
Provides information about the FileSelected event callback.
Inheritance
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public class SelectedEventArgs : Object
Remarks
This event is triggered after files are selected or dropped for upload. It provides comprehensive information about the selected files, allows cancellation of the selection, and enables modification of the file list before processing. This event is crucial for implementing file validation, preprocessing, and custom selection logic.
Constructors
SelectedEventArgs()
Declaration
public SelectedEventArgs()
Properties
Cancel
Gets or sets a value indicating whether the file selection action has been canceled.
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Setting this property to true
will prevent the selected files from being added to the
upload queue. This allows for conditional file selection based on validation rules, file type
restrictions, or other business logic requirements.
CurrentRequest
Gets or sets the XMLHttpRequest instance associated with the file selection operation.
Declaration
public object CurrentRequest { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An object containing XMLHttpRequest details, or |
Remarks
This property provides access to the current HTTP request headers that will be used for subsequent upload operations. It allows for customization of request headers, authentication, and other HTTP-specific settings before the upload process begins.
CustomFormData
Gets or sets additional custom data in key-value pair format to be submitted with the upload action.
Declaration
public object CustomFormData { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An object containing key-value pairs of additional data, or |
Remarks
This property allows developers to include additional parameters or metadata with subsequent upload requests. Common uses include authentication tokens, user identifiers, or other application-specific data required by the server-side upload handler.
Event
Gets or sets the original event arguments associated with the file selection operation.
Declaration
public object Event { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An object containing the original event arguments for the current event, or |
Remarks
This property provides access to the underlying event arguments that triggered the file selection. Note: This property is obsolete and should no longer be used in new implementations. Use other properties of this class for accessing file selection information.
FilesData
Gets or sets the list of files selected for uploading.
Declaration
public List<FileInfo> FilesData { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<FileInfo> | A System.Collections.Generic.List<> containing the details of selected files, or |
Remarks
This property contains information about all files that were selected by the user, including file names, sizes, types, and other metadata. This information can be used for validation, preprocessing, or displaying file information to users before upload begins.
IsCanceled
Gets or sets a value indicating whether the file selection operation has been canceled.
Declaration
public bool IsCanceled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This property indicates whether the file selection process was canceled, either by user action or programmatic intervention. It provides additional context about the selection state and can be used to determine appropriate handling of the selection event.
IsModified
Gets or sets a value indicating whether the selected files list is generated based on modified data.
Declaration
public bool IsModified { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This property indicates whether the original file selection has been modified through custom
logic or preprocessing. When true
, the ModifiedFilesData property should
be used instead of the original FilesData for generating the file list.
ModifiedFilesData
Gets or sets the modified file data used to generate the file items when IsModified is true
.
Declaration
public List<FileInfo> ModifiedFilesData { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<FileInfo> | A System.Collections.Generic.List<> containing the modified file details, or |
Remarks
This property contains the modified file information that should be used for generating the file list when the original selection has been altered. The availability and content of this property depends on the value of the IsModified property. This enables custom file processing and filtering during the selection process.
ProgressInterval
Gets or sets the progress interval step value for the progress bar.
Declaration
public string ProgressInterval { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the step value for progress updates, or |
Remarks
This property defines the interval at which progress events are triggered during file upload operations. It helps control the frequency of progress updates, allowing developers to balance between progress granularity and performance considerations.
Type
Gets or sets the type of the original event that triggered the file selection.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the event type, or |
Remarks
This property indicates the type of user interaction that triggered the file selection, such as drag-and-drop, browse button click, or programmatic selection. Note: This property is obsolete and should no longer be used in new implementations.