Angular FileManager Properties
This section describes options that configure the FileManager widget's contents, behavior, and appearance.
See Also
- Configure a Widget: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
accessKey
Specifies the shortcut key that sets focus on the widget.
The value of this option will be passed to the accesskey
attribute of the HTML element that underlies the widget.
activeStateEnabled
Specifies whether or not the widget changes its state when interacting with a user.
This option is used when the widget is displayed on a platform whose guidelines include the active state change for widgets.
customizeDetailColumns
Customizes columns in details view. Applies only if itemView.mode is "details".
The columns before customization.
The columns after customization.
jQuery
$(function() { $("#fileManagerContainer").dxFileManager({ // ... customizeDetailColumns: function(columns) { // ... // Customize the "columns" array objects here // ... return columns; } }); });
Angular
<dx-file-manager ... [customizeDetailColumns]="fileManager_customizeDetailColumns"> </dx-file-manager>
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { // Uncomment the following lines if the function should be executed in the component's context // constructor() { // this.fileManager_customizeDetailColumns = this.fileManager_customizeDetailColumns.bind(this); // } fileManager_customizeDetailColumns(columns) { // ... // Customize the "columns" array objects here // ... return columns; } }
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { DxFileManagerModule } from 'devextreme-angular'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, DxFileManagerModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
Vue
<template> <DxFileManager ... :customize-detail-columns="fileManager_customizeDetailColumns" /> </template> <script> import 'devextreme/dist/css/dx.common.css'; import 'devextreme/dist/css/dx.light.css'; import DxFileManager from 'devextreme-vue/file-manager'; export default { components: { DxFileManager }, methods: { fileManager_customizeDetailColumns(columns) { // ... // Customize the "columns" array objects here // ... return columns; } } } </script>
React
import React from 'react'; import 'devextreme/dist/css/dx.common.css'; import 'devextreme/dist/css/dx.light.css'; import FileManager from 'devextreme-react/file-manager'; class App extends React.Component { // Uncomment the following lines if the function should be executed in the component's context // constructor(props) { // super(props); // this.fileManager_customizeDetailColumns = this.fileManager_customizeDetailColumns.bind(this); // } fileManager_customizeDetailColumns(columns) { // ... // Customize the "columns" array objects here // ... return columns; } render() { return ( <FileManager ... customizeDetailColumns={this.fileManager_customizeDetailColumns} /> ); } } export default App;
customizeThumbnail
Allows you to provide custom icons to be used as thumbnails.
File or folder parameters.
An icon to use as a thumbnail.
This function should return one of the following:
- The icon's URL
- The icon's name if the icon is from the DevExtreme icon library
- The icon's CSS class if the icon is from an external icon library (see External Icon Libraries)
- The icon in the Base64 format
elementAttr
Specifies the attributes to be attached to the widget's root element.
jQuery
$(function(){ $("#fileManagerContainer").dxFileManager({ // ... elementAttr: { id: "elementId", class: "class-name" } }); });
Angular
<dx-file-manager ... [elementAttr]="{ id: 'elementId', class: 'class-name' }"> </dx-file-manager>
import { DxFileManagerModule } from "devextreme-angular"; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxFileManagerModule ], // ... })
ASP.NET MVC Controls
@(Html.DevExtreme().FileManager() .ElementAttr("class", "class-name") // ===== or ===== .ElementAttr(new { @id = "elementId", @class = "class-name" }) // ===== or ===== .ElementAttr(new Dictionary<string, object>() { { "id", "elementId" }, { "class", "class-name" } }) )
@(Html.DevExtreme().FileManager() _ .ElementAttr("class", "class-name") ' ===== or ===== .ElementAttr(New With { .id = "elementId", .class = "class-name" }) ' ===== or ===== .ElementAttr(New Dictionary(Of String, Object) From { { "id", "elementId" }, { "class", "class-name" } }) )
fileProvider
Specifies the file provider.
File providers are components that provide APIs used to access and modify virtual file systems.
Refer to File Providers for information on supported file providers.
focusStateEnabled
Specifies whether the widget can be focused using keyboard navigation.
height
Specifies the widget's height.
This option accepts a value of one of the following types:
Number
The height in pixels.String
A CSS-accepted measurement of height. For example,"55px"
,"80%"
,"inherit"
.Function
A function returning either of the above. For example:JavaScriptheight: function() { return window.innerHeight / 1.5; }
hint
Specifies text for a hint that appears when a user pauses on the widget.
hoverStateEnabled
Specifies whether the widget changes its state when a user pauses on it.
onContentReady
A function that is executed when the widget's content is ready and each time the content is changed.
Information about the event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only when using Knockout. |
onDisposing
A function that is executed before the widget is disposed of.
Information about the event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if you use Knockout. |
onInitialized
A function used in JavaScript frameworks to save the widget instance.
Information about the event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
onOptionChanged
A function that is executed after a widget option is changed.
Information about the event.
Name | Type | Description |
---|---|---|
model |
The model data. Available only if you use Knockout. |
|
fullName |
The path to the modified option that includes all parent options. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The widget's instance. |
|
name |
The modified option if it belongs to the first level. Otherwise, the first-level option it is nested into. |
|
value | any |
The modified option's new value. |
onSelectedFileOpened
A function that is executed when the selected file is opened.
Information about the event that caused the function's execution.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
fileItem |
File parameters. |
|
model |
The model data. Available only if you use Knockout. |
jQuery
$(function() { $("#fileManagerContainer").dxFileManager({ // ... onSelectedFileOpened: function(e) { // Your code goes here } }); });
Angular
<dx-file-manager ... (onSelectedFileOpened)="fileManager_onSelectedFileOpened($event)"> </dx-file-manager>
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { fileManager_onSelectedFileOpened(e) { // Your code goes here } }
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { DxFileManagerModule } from 'devextreme-angular'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, DxFileManagerModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
Vue
<template> <DxFileManager ... :selected-file-opened="fileManager_onSelectedFileOpened" /> </template> <script> import 'devextreme/dist/css/dx.common.css'; import 'devextreme/dist/css/dx.light.css'; import DxFileManager from 'devextreme-vue/file-manager'; export default { components: { DxFileManager }, methods: { fileManager_onSelectedFileOpened(e) { // Your code goes here } } } </script>
React
import React from 'react'; import 'devextreme/dist/css/dx.common.css'; import 'devextreme/dist/css/dx.light.css'; import FileManager from 'devextreme-react/file-manager'; class App extends React.Component { fileManager_onSelectedFileOpened(e) { // Your code goes here } render() { return ( <FileManager ... onSelectedFileOpened={this.fileManager_onSelectedFileOpened} /> ); } } export default App;
rtlEnabled
Switches the widget to a right-to-left representation.
When this option is set to true, the widget text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.
DevExpress.config({ rtlEnabled: true });
See Also
- Right-to-Left Support Demo: DataGrid | Navigation Widgets | Editors
selectionMode
Specifies whether a user can select a single or multiple files and folders in the item view simultaneously.
tabIndex
Specifies the number of the element when the Tab key is used for navigating.
The value of this option will be passed to the tabindex
attribute of the HTML element that underlies the widget.
width
Specifies the widget's width.
This option accepts a value of one of the following types:
Number
The width in pixels.String
A CSS-accepted measurement of width. For example,"55px"
,"80%"
,"auto"
,"inherit"
.Function
A function returning either of the above. For example:JavaScriptwidth: function() { return window.innerWidth / 1.5; }
If you have technical questions, please create a support ticket in the DevExpress Support Center.