SMART datagrid v.1 > Classes > TreeOptions

Back  Forward

DataLudi.TreeOptions.childrenCallback  property

Callback function which returns whether to display the expand box when Tree Row has child rows. 

    function (row:TreeRow): Boolean;

First, the expand box will be displayed if TreeRow.count is greater than 0. When count is 0, it will be displayed if explicitly set Tree.hasChildren as true. When hasChildren is undefined, it will call callback function which has been specified by this property and determine whether to display the expand box according to the value returned by callback function. 

If expand the Collapsed row, it will explicitly set hasChildren as false and will not call this callback function again until reset hasChildren as undefined

Defaults to null.

Getter
function childrenCallback(): Function
Setter
function setChildrenCallback(value: Function)
See Also
TreeRow.hasChildren
TreeRow.collapsed
expand
Tree Overview
Examples
Hello Tree