Check documentation for the latest version 6.0 of dhtmlxSuite dhtmlxTreeGrid DHTMLX Docs

dhtmlxTreeGrid

get_id

returns the id of an item.

$dataItem->get_id();

See also:

get_index

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

$dataItem->get_index();

Parameters:

  • none.

get_parent_id

returns the parent id of the selected item.

$dataItem->get_parent_id();

Parameters:

  • none

get_value

returns the value of a field.

$dataItem->get_value($name);

Parameters:

  • $name - name or alias of the field.

See Also:

set_cell_attribute

sets an attribute for a cell of item.

$dataItem->set_cell_attribute($name,$attr,$value)

Parameters:

  • $name - name of alias of the cell
  • $attr - name of attribute
  • $value - value of attribute

See Also:

set_cell_class

sets the css class for a cell of item.

$dataItem->set_cell_class($name,$value);

Parameters:

  • $name - name or alias of the cell
  • $value - css class for the cell

See Also:

set_cell_style

sets the style for a cell of item.

$dataItem->set_cell_style($style);

Parameters:

  • $style - HTML style attributes.

See Also:

set_id

sets the id of the item.

$dataItem->set_id($value);

Parameters:

  • $value - id of the item.

See also:

set_image

sets image for all check states of the node in tree.

$dataItem->set_image($img);

Parameters:

  • $img - relative path to image which will be set for the item of tree (relative to the folder with tree's icons).

skip

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

$dataItem->skip()

Parameters:

  • none

set_row_attribute

sets an attribute for any row in the component.

$dataItem->set_row_attribute($attr,$value);

Parameters:

  • $attr - name of attribute
  • $value - value of attribute

See Also:

set_row_color

sets color for any row in the component.

$dataItem->set_row_color($color)

Parameters:

  • $color - color of a row

See Also:

set_row_style

sets the style for any row of the component.

$dataItem->set_row_style($style);

Parameters:

  • $style - HTML style attributes

See Also:

set_value

sets the value of a field.

$dataItem->set_value($name,$value)

Parameters:

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

See Also:

set_userdata

(available from version 1.5)

sets user data for the item.

$dataItem->set_userdata($name,$value)

Parameters:

  • $name - the user data name
  • $value - user data string

See also:

Back to top