Class links.TreeGrid.Item
Defined in: treegrid.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
collapse()
Collapse the item
|
|
expand()
Expand the item
|
|
findItem(itemData)
Find an Item by its data
|
|
Calculate the width of the fields from the HTML DOM
|
|
Calculate the total width of the icons (if any)
|
|
onDragEnter(event)
Event handler for drag enter event
this will highlight the current item
|
|
onDragLeave(event)
Event handler for drag leave event
|
|
onDragOver(event)
Event handler for drag over event
|
|
onDrop(event)
Event handler for drop event
|
|
onEvent(event)
trigger an event
|
|
reflow()
Recalculate the size of the DOM elements of the header
|
|
repaint()
Redraw the node
|
|
setFields(data, columns)
read the field values from the item data
|
|
Toggle expand/collapse of the item
|
|
update()
Update the data of the child grid (if there is a child grid)
|
|
updateHeight(child, diffHeight)
Update the height of this item, because a child's height has been changed.
|
Class Detail
links.TreeGrid.Item()
- Parameters:
- {Object} params.
- A key-value map containing parameters: index, top, options
Method Detail
collapse()
Collapse the item
expand()
Expand the item
{links.TreeGrid.Item | null}
findItem(itemData)
Find an Item by its data
- Parameters:
- {Object} itemData
- Returns:
- {links.TreeGrid.Item | null}
{Number[]}
getFieldWidths()
Calculate the width of the fields from the HTML DOM
- Returns:
- {Number[]} widths
{Number}
getIconsWidth()
Calculate the total width of the icons (if any)
- Returns:
- {Number} width
onDragEnter(event)
Event handler for drag enter event
this will highlight the current item
- Parameters:
- event
onDragLeave(event)
Event handler for drag leave event
- Parameters:
- event
onDragOver(event)
Event handler for drag over event
- Parameters:
- event
onDrop(event)
Event handler for drop event
- Parameters:
- event
onEvent(event)
trigger an event
- Parameters:
- {String} event
- Event name. For example 'expand' or 'collapse'
{Boolean}
reflow()
Recalculate the size of the DOM elements of the header
- Returns:
- {Boolean} resized
repaint()
Redraw the node
setFields(data, columns)
read the field values from the item data
- Parameters:
- {Object} data
- Item data
- {Array} columns
- Array with column objects, the column objects contain a name, left, and width of the column
toggleExpand()
Toggle expand/collapse of the item
update()
Update the data of the child grid (if there is a child grid)
updateHeight(child, diffHeight)
Update the height of this item, because a child's height has been changed.
This will not cause any repaints, but just updates the height of this node.
updateHeight() is called via an onUpdateHeight() from a child node.
- Parameters:
- {links.TreeGrid.Node} child
- {Number} diffHeight
- change in height