Check documentation for the latest version of dhtmlxSuite dhtmlxTree DHTMLX Docs

dhtmlxTree

get_check_state

returns the state of selected item.

<cfset dataItem.get_check_state()>

Returns:

  • state of checkbox related to the item:
  • '0' - unchecked
  • '1' - checked.
  • '-1' - third (custom) state. See also:

  • set_check_state

get_id

returns id of the item.

<cfset dataItem.get_id()>

See also:

get_index

returns an index of the currently selected item (for example, in grid, it will be an index of row )

<cfset dataItem.get_index()>

Parameters:

  • none.

get_parent_id

returns parent id of selected item.

<cfset dataItem.get_parent_id()>

Parameters:

  • none

get_value

returns value of a field.

<cfset dataItem.get_value(name)>

Parameters:

  • name - name or alias of the field.

See Also:

set_attribute

allows to set some attribute for the item.

<cfset dataItem.set_attribute(name, value)>

Parameters:

  • name - the name of an attribute.
  • value - the value that an attribute is set to.

set_check_state

allows to set the state of a checkbox related to the item.

<cfset dataItem.set_check_state(value)>

Parameters:

  • value - state of the item.

    Valid values are:

  • '0' - unchecked.

  • '1' - checked.
  • '-1' - third custom state. See also:

  • get_check_state

set_id

sets id of the item.

<cfset dataItem.set_id(value)>

Parameters:

  • value - id of the item. See also:

  • get_id

set_image

allows to set image for any item in tree.

<cfset dataItem.set_image(img)>

Parameters:

  • img - relative path to image which will be set for a item. Description:

  • Can be used with variable number of parameters.

<cfset dataItem.set_image(img1,img2,img3)>
  • img1 - image of folder in opened state
  • img2 - image of folder in closed state
  • img3 - image of leaf item

set_kids

allows to mark item as a leaf or branch of tree.

<cfset dataItem.set_kids(is_enabled)>

Parameters:

  • is_enabled - (boolean) specifies whether an item must be marked as a branch.
  • true - item will be marked as a branch.
  • false - item will be marked as a leaf.

skip

ignores the current item while rendering output. Allows to define custom filtering rules.

<cfset dataItem.skip()>

Parameters:

  • none

set_value

sets value of a field.

<cfset dataItem.set_value(name, value)>

Parameters:

  • name - name or alias of the field
  • value - value of the field in question

See Also:

Back to top