Skip to main content

DataView API overview

Methods

NameDescription
destructor()removes DataView instance and releases occupied resources
editItem()enables editing of an item
getFocus()returns the id of an item in focus
getFocusItem()returns the object of an item in focus
paint()repaints a dataview on a page
resetFocus()resets focus and moves the scroll to the beginning of the dataview
setFocus()sets focus to an item by its id and moves the scroll to it
important

Events

NameDescription
afterDragfires after dragging of an item is finished
afterDropfires before the user has finished dragging an item but after the mouse button is released
afterEditEndfires after editing of an item is ended
afterEditStartfires after editing of an item has started
beforeDragfires before dragging of an item has started
beforeDropfires before the user has finished dragging an item and released the mouse button
beforeEditEndfires before editing of an item is completed
beforeEditStartfires before editing of an item has started
cancelDropfires on moving a mouse pointer out of item's borders while dragging the item
canDropfires when a dragged item is over a target item
clickfires on clicking an item
doubleClickfires on double clicking an item
dragInfires when an item is dragged to another potential target
dragOutfires when an item is dragged out of a potential target
dragStartfires when dragging of an item has started
focusChangefires on moving focus to a new item
itemMouseOverfires on moving the mouse pointer over an item
itemRightClickfires on right clicking an item
important

Properties

NameDescription
cssOptional. Adds a CSS class(es) to the component
dataOptional. Specifies an array of data objects to set into the dataview
dragCopyOptional. Defines that an item is copied to a target during drag-n-drop
dragModeOptional. Enables drag-n-drop in DataView
editableOptional. Enables editing in DataView
eventHandlersOptional. Adds event handlers to the HTML elements of a custom template of DataView items
gapOptional. Sets margins for DataView items
heightOptional. Sets the height of DataView
itemHeightOptional. Sets the height of an item
itemsInRowOptional. Specifies the number of data items in a row
keyNavigationOptional. Enables/disables navigation in DataView by arrow keys
multiselectionOptional. Enables selection of multiple DataView items, sets the mode of multiselection
selectionOptional. Enables selection of DataView items
templateOptional. Specifies a template for DataView items