Methods

This section describes methods that can be used in code to manipulate the dxExporter widget.

All the methods listed in this section should be called of the dxExporter widget's instance. To obtain it, use the following construction.

JavaScript
var exporter = $('#exporterContainer').dxExporter('instance');

beginUpdate()

Prevents the widget from refreshing until the endUpdate method is called.

The beginUpdate and endUpdate methods allow you to apply several modifications to the widget at once. After the beginUpdate method is called, the widget does not rerender itself until the endUpdate method is called. The usage of these methods prevents excessive widget updating when changing multiple widget settings at once.

NOTE: It is recommended that you do not perform any actions on a widget within the updating transaction other than changing widget options.

endUpdate()

Enables the widget to refresh after the beginUpdate method call.

The beginUpdate and endUpdate methods allow you to apply several modifications to the widget at once. After the beginUpdate method is called, the widget does not rerender itself until the endUpdate method is called. The usage of these methods prevents excessive widget updating when changing multiple widget settings at once.

NOTE: It is recommended that you do not perform any actions on a widget within the updating transaction other than changing widget options.

exportTo(fileName, format)

Exports a DevExtreme data visualization widget into a file with a specified name and format.

Parameters:
fileName: String
The name of a destination file.
format: String
A required format.

To specify the widget that should be exported, use the sourceContainer option. Refer to the exportFormat option description to learn more about the formats available for exporting into.

instance()

Returns an instance of the widget.

Return Value: Object
An instance of the widget.

Use this method to access the widget.

option()

Returns the object representing explicitly specified widget options.

Return Value: Object
Explicitly specified widget options.

Use this method to obtain the object of explicitly specified widget options. To change the value of one widget option, call the option(optionName, optionValue) method. To change values of several options, call the option(options) method.

option(optionName)

Gets the value of the specified configuration option of the widget.

Parameters:
optionName: String
The name of the option to get.
Return Value: any
The value of the specified option.

option(optionName, optionValue)

Sets a value to the specified configuration option of the widget.

Parameters:
optionName: String
The name of the required option.
optionValue: any
The value to be assigned to the required option.

option(options)

Sets one or more widget options.

Parameters:
options: Object
An object containing required configuration options.

To set one or more widget options, pass the object that contains fields representing these options as the options parameter.

This method is useful if you need to configure several widget options at once.

print()

Calls the browser's print window.

To specify the widget that should be printed, use the sourceContainer option.