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
setFocus()sets focus to an item by its id
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
cssadds a CSS class(es) to the component
dataspecifies an array of data objects to set into the dataview
dragCopydefines that an item is copied to a target during drag-n-drop
dragModeenables drag-n-drop in DataView
editableenables editing in DataView
eventHandlersadds event handlers to the HTML elements of a custom template of DataView items
gapsets margins for DataView items
heightsets the height of DataView
itemHeightsets the height of an item
itemsInRowspecifies the number of data items in a row
keyNavigationenables/disables navigation in DataView by arrow keys
multiselectionenables selection of multiple DataView items, sets the mode of multiselection
selectionenables selection of DataView items
templatespecifies a template for DataView items