Gallery

An image gallery widget.

Type: Object

The dxGallery widget displays selected images in a horizontally scrolled view. The image file links are loaded from the array specified via the dataSource configuration option. You can specify a simple array as the widget data source.

JavaScript
var galleryData = [
    "images/img1.png",
    "images/img2.png",
    "images/img3.png",
    "images/img4.png"
];

To create the dxGallery widget, add a div element with dxGallery Knockout binding within the body of the required view.

HTML
<div data-bind="dxGallery: { dataSource: galleryData }"></div>

For more information on creating widgets, refer to the Add a Widget documentation section.

See the Customize Widget Items Appearance topic to learn how to adjust the appearance of widget items.

The following demo illustrates how to create a widget without creating an HtmlApplication, views, and layouts. Refer to the Add a widget documentation section to learn how to create widgets within views in a PhoneJS application.

Show Example:
jQuery

Configuration

An object defining configuration options for the dxGallery widget.

Methods

This section describes members used to manipulate the widget.