Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FileAttachmentListViewController Class

A ViewController that allows users to create a new object with the selected file attachment via the AddFromFile Action and by dragging and dropping a file into the List Editor’s control.

Namespace: DevExpress.ExpressApp.FileAttachments.Win

Assembly: DevExpress.ExpressApp.FileAttachment.Win.v24.2.dll

#Declaration

public class FileAttachmentListViewController :
    FileAttachmentControllerBase

#Remarks

The FileAttachmentListViewController Controller is activated in List Views when the FileAttachmentAttribute is applied to the current List View’s object type. The FileAttachmentAttribute.FileDataPropertyName parameter passed to the attribute specifies the IFileData type property that stores files added via the AddFromFile Action.

FileAttach_AddFromFileAction

Additionally, an object with the associated file attachment can be created by dragging and dropping a file to the grid control. To provide this functionality, the FileAttachmentListViewController controller handles the DragDrop event of the List Editor’s control.

FileAttach_DragDrop

To customize the FileAttachmentListViewController controller behavior, you can access the AddFromFile Action exposed via the FileAttachmentListViewController.AddFromFileAction property and handle Action’s events, or override the following virtual methods.

Method Description
AddFromFile Displays the OpenFileDialog dialog to obtain the names of files to add. To get file names in a custom manner, override this method and pass file names list to the protected AddFiles method.
GetFileTypesFilter Gets the file types filter passed to the FileDialog.Filter property of the OpenFileDialog dialog displayed by the AddFromFile Action.

Refer to the following topics for more information on file attachment properties:

#Implements

#Inheritance

Object
MarshalByRefObject
Component
Controller
ViewController
DevExpress.ExpressApp.FileAttachments.Win.FileAttachmentControllerBase
FileAttachmentListViewController
See Also