Configuration

An object defining configuration options for the dxList widget.

activeStateEnabled

A Boolean value specifying whether or not the widget changes its state when interacting with a user.

Type: Boolean
Default Value: true

This option is used when the widget is displayed on a platform whose guidelines include the active state change for widgets.

Show Example:
jQuery

autoPagingEnabled

A Boolean value specifying whether or not to load the next page from the data source when the list is scrolled to the bottom.

Type: Boolean
Default Value: true

You can also load the next page's data on the "More" button click. Assign true to the showNextButton option to show the "more" button.

Show Example:
jQuery

clickAction

An action performed when the widget is clicked.

Type: Action
Default Value: null

Show Example:
jQuery

dataSource

A data source used to fetch data to be displayed by the dxList widget.

Type: Object
Default Value: null

The default template of a data source item object may contain the following fields.

  • html - specifies the html code inserted into the item element.
  • text - specifies the text inserted into the item element
  • key - specifies the name of the list items group. Use this field to specify a data source for a grouped list. See the dxList widget description for an example.

Refer to the Data-Bound Application tutorial for more information.

Show Example:
jQuery

disabled

A Boolean value specifying whether or not a component can respond to user interaction.

Type: Boolean
Default Value: false

Create an observable variable and assign it to this option to specify the availability of the component at runtime.

Show Example:
jQuery

grouped

A Boolean value specifying whether or not to display a grouped list.

Type: Boolean
Default Value: false

If this option is set to 'true', the object assigned to the items option should include the key and items properties. The key property specifies the group caption in the list. The items property represents an array listing the group items.

Show Example:
jQuery

groupRender

A function rendering a group header.

Type: function
Default Value: null

The rendering function should have the following parameters and return an HTML string, element, or jQuery object representing the rendered group.

  • groupData - the data source element representing the rendered group
  • groupIndex - the index of the rendered group
  • groupElement - the HTML element containing the rendered group
Show Example:
jQuery

groupTemplate

The name of the template used to display a group header.

Type: String
Default Value: "group"

Show Example:
jQuery

height

Specifies the height of the widget.

Type: Number|String|function
Default Value: undefined

The option can hold a value of the following types:

  • numeric - the height of the widget in pixels;
  • string - a CSS measurement of the widget height (e.g., "55px", "80%", "auto" and "inherit");
  • function - a function returning the widget height (e.g., height:function(){ return baseHeight - 10 + "%"; }).

itemClickAction

An action performed when a collection item is clicked.

Type: Action
Default Value: null

An object passed to the action function assigned to this option can have the following fields besides the basic field set.

  • itemData - contains an object representing the clicked item
  • itemElement - contains an html element representing the clicked item

itemHoldAction

An action performed when an item is being held for a specified time period.

Type: Action
Default Value: null

Show Example:
jQuery

itemHoldTimeout

The time period in milliseconds before itemHoldAction execution.

Type: Number
Default Value: 750

Show Example:
jQuery

itemRender

A function used to render collection items.

Type: function
Default Value: null

The rendering function should have the following parameters, and return an HTML string, element, or jQuery object representing the rendered item.

  • itemData - an object representing the rendered item
  • itemIndex - an index of the rendered item
  • itemElement - a container element containing the rendered item

The following is an example of a function used to render an item.

Show Example:
jQuery

itemRenderedAction

An action performed after a collection item is rendered.

Type: Action
Default Value: null

items

An array of items displayed by the widget.

Type: Array

You can use the dataSource option instead. Unlike the items option, the dataSource option can take on the DataSource configuration object as well as a simple array.

itemSwipeAction

An action performed when an item is swiped.

Type: Action
Default Value: null

Show Example:
jQuery

itemTemplate

The name of the template used to render widget items, or the function returning the template name.

Type: String|function
Default Value: "item"

Show Example:
jQuery

noDataText

The text displayed by the widget if the item collection is empty.

Type: String
Default Value: "No data to display"

pullRefreshEnabled

A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture.

Type: Boolean
Default Value: false

If the option is set to true, the list data is refreshed each time you pull down and release the list contents.

NOTE: The "pull down to refresh" gesture is not supported by desktop browsers and Windows Phone devices. You can use it only in mobile themes except the Windows Phone theme.

Show Example:
jQuery

scrollByContent

A Boolean value specifying if the list is scrolled by content.

Type: Boolean
Default Value: true

scrollByThumb

A Boolean value specifying if the list is scrolled using the scrollbar.

Type: Boolean
Default Value: false

scrollingEnabled

A Boolean value specifying whether to enable or disable list scrolling.

Type: Boolean
Default Value: true

showNextButton

A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list, or when a button is clicked.

Type: Boolean
Default Value: false

If this option is set to true, the widget shows a "Next Page" button, and loads the next page of data when you click this button. Otherwise, the widget loads the data automatically, each time you reach the bottom of the list.

NOTE: The default value of this option is false if your application is running on a mobile platform. If you run the application on the desktop, the default value is true.

Show Example:
jQuery

showScrollbar

A Boolean value specifying if the widget scrollbar is visible.

Type: Boolean
Default Value: true

Show Example:
jQuery

visible

A Boolean value specifying whether or not the widget is visible.

Type: Boolean
Default Value: true

width

Specifies the width of the widget.

Type: Number|String|function
Default Value: undefined

The option can hold a value of the following types:

  • numeric - the widget width in pixels;
  • string - a CSS measurement of the widget width (e.g., "55px", "80%", "auto" and "inherit");
  • function - the function returning the widget width (e.g., width:function(){ return baseWidth - 10 + "%"; }).