SMART datagrid v.1 > Classes > TreeOptions

Back  Forward

DataLudi.TreeOptions.childrenCallback  property

返回当树行具有子行时所显示的展开框的显示与否的回调函数。 

    function (row:TreeRow): Boolean;

首先,当TreeRow.count大于0时,将会显示展开框。 当count为0时,如果将Tree.hasChildren明确设置为true,就会进行显示。 当hasChildren为undefined时,将会调用通过该属性而指定的回调函数,并且根据回调函数所返回的值,决定是否显示展开框。 

一旦展开折叠的行,就会将hasChildren明确设置为false, 并且直到将hasChildren重新设置为undefined为止,将不会重新调用该回调函数。 

默认值为null.

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