Skip to main content

ASPxClientFileManager.GetSelectedFile Method

Returns the selected file within the ASPxFileManager control’s file container.

Declaration

GetSelectedFile(): ASPxClientFileManagerFile

Returns

Type Description
ASPxClientFileManagerFile

An ASPxClientFileManagerFile object, that is the selected file, or null if no file is selected.

Remarks

Use the GetSelectedFile property to get the currently selected file within the ASPxFileManager. You can customize the appearance of the selected file, using the file’s FileManagerFileStyle.SelectionActiveStyle and FileManagerFileStyle.SelectionInactiveStyle properties, or common to files and folders, the FileManagerItemStyle.SelectionActiveStyle and FileManagerItemStyle.SelectionInactiveStyle properties.

Example

In the code below, the GetSelectedFileName function writes the name of the currently selected file to the selectedFileName variable.

function GetSelectedFileName() {
selectedFileName = fileManager.GetSelectedFile().name;
}
See Also