Check documentation for the latest version of dhtmlxSuite Object Constructor DHTMLX Docs

Object Constructor

There are two possible syntaxes of DataView constructor:


var myDataView = new dhtmlXDataView("container_id");

Where "container_id" - id of the HTML container, inside of which DataVIew will be initialized.


var myDataView = new dhtmlXDataView({

The parameters are:

  • container - {string|number|HTMLElement} the ID of an HTML container inside of which an item will be rendered, or the container itself
    • ID of HTML element
    • HTML object
  • drag - {boolean} enables drag-n-drop
    • true - drag-n-drop is allowed
    • false - drag-n-drop is denied
  • select - {string|boolean} defines selection mode
    • false - selection is denied
    • true - single selection is allowed
    • "multiselect" - multiselection is allowed
  • type - {string|object} the name of a render-type, or a custom template
    • name of type
    • type object, check the Templates article
  • height - {string} can be set as "auto" to force auto-height (if the parameter isn't set dataview adjusts to the height of the parent container)
    • "auto" - force auto-height mode (the dataview height will be enlarged to show all items)
  • pager - {object} paging control settings
    • pager object, check the Paging article
  • tooltip - {object} tooltip object settings
    • tooltip object
  • autowidth - {number|boolean} adjusts items' size to the container's size
    • true - 1 item in a row
    • number - the number of items to be set in a row
var myDataView = new dhtmlXDataView({
        template:"Details: #property#"

Related sample:  Static loading

Back to top