Dataview API

Methods
destructor removes Dataview instance and releases occupied resources
disableSelection disables selection of items in DataView
edit enables editing of an item
editItem enables editing of an item
enableSelection enables selection of items in DataView
getFocus returns the id of an item in focus
getFocusIndex returns the index of the 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
setFocusIndex sets focus to an item according to its index

Data Collection

add adds a new item to the component
copy creates a copy of an item at the defined position
exists checks whether the specified item exists in the component
filter filters items in the component by the specified key
find finds an item that corresponds to the specified parameters
findAll finds all the items that correspond to the specified parameters
getId returns the id of the item by its index
getIndex returns the index of the item by its id
getItem returns the object of an item by its id
load loads data from an external file
map iterates through all items of the component
move moves an item to the defined position
parse loads data from a local data source
remove deletes the specified item from the component
removeAll deletes all the items from the component
serialize serializes data of the component into an array of JSON objects
sort sorts data items in a component
update updates properties of the item

Selection

add selects a specified item
disable disables selection of items
enable enables selection of items
getId returns the id of a selected item
getItem returns the object of a selected item
remove unselects a previously selected item
Events
afterDrag fires after dragging of an item is finished
afterDrop fires before the user has finished dragging an item but after the mouse button is released
afterEditEnd fires after editing of an item is ended
afterEditStart fires after editing of an item has started
beforeDrag fires before dragging of an item has started
beforeDrop fires before the user has finished dragging and released the mouse button over a target item
beforeEditEnd fires before editing of an item is completed
beforeEditStart fires before editing of an item has started
cancelDrop fires on moving a mouse pointer out of item's borders while dragging the item
canDrop fires when a dragged item is over a target item
click fires on clicking an item
contextMenu fires on calling a context menu for an item
doubleClick fires on double clicking an item
dragIn fires when an item is dragged to another potential target
dragOut fires when an item is dragged out of a potential target
dragStart fires when dragging of an item has started
focusChange fires on moving focus to a new item
itemMouseOver fires on moving the mouse pointer over an item
itemRightClick fires on right clicking an item

Data Collection

afterAdd fires after adding a new item into a data collection
afterRemove fires after removing a new item from a data collection
beforeAdd fires before adding a new item into a data collection
beforeRemove fires before removing an item from a data collection
change fires when a data collection is modified
load fires when items are loaded in a data collection
loadError fires when loading of data fails
removeAll fires when all items are removed from a data collection

Selection

afterSelect fires after selecting an item
afterUnSelect fires after unselecting an item
beforeSelect fires on selecting an item, but before the item is really selected
beforeUnSelect fires on unselecting an item, but before the item is really unselected
Properties
css adds a CSS class(es) to the component
data specifies an array of data objects to set into the dataview
dragCopy defines that an item is copied to a target during drag-n-drop
dragMode enables drag-n-drop in DataView
editable enables editing in DataView
editing enables editing in DataView
eventHandlers adds event handlers to HTML elements of a custom template of DataView items
gap sets margins for DataView items
height sets the height of Dataview
itemHeight sets the height of an item
itemsInRow specifies the number of data items in a row
keyNavigation enables/disables navigation in DataView by arrow keys
multiselection enables selection of multiple DataView items, sets the mode of multiselection
multiselectionMode sets the mode of multiselection
selection enables selection of DataView items
template specifies a template for DataView items
Back to top