DHTMLX Docs & Samples Explorer

Connector object

dynamic_loading

enable dynamical loading mode for connector.

$conn->dynamic_loading([$rowsNum]);

Parameters:

  • tree, treegrid - no parameters
  • grid - number of rows which should be initially loaded (the value should be more than number of rows visible in grid, or at least any positive number)
  • combo - maximum number of options which server will send for single data request in autocomplete mode

enable_log

enable logging for connector.

$conn->enable_log("path to log file");

Parameters:

  • path - absolute or relative path to text file where log will be written.

is_select_mode

returns current active mode.

$conn->is_select_mode();

Parameters:

  • none.

Returns:

  • true, if select mode is active.
  • false, if update mode is active.

render_sql

configure connector to take data based on provided SQL text.

$conn->render_sql($sql,$id,$text,$extra,$relation);

Parameters:

  • $sql - any sql code, which will be used as a base for data selection.
  • $id - name of id field.
  • $text - comma separated list of data fields.
  • $extra - comma separated list of extra fields, optional.
  • $relation_id - used for building hierarchy in case of Tree and TreeGrid.

See Also:

render_table

configure connector to take data from single table.

$conn->render_table($table,$id,$text,$extra,$relation);

Parameters:

  • $table - name of table.
  • $id - name of id field.
  • $text - comma separated list of data fields.
  • $extra - comma separated list of extra fields, optional.
  • $relation_id - used for building hierarchy in case of Tree and TreeGrid.

Description:

  • If you want to render all fields from DB ( except of identity field), you can use simplified command:

    $conn->render_table($table);

See Also:

set_encoding

allows to set encoding that will be applied to generated XML (default encoding is UTF-8).

$conn->set_encoding("iso-8859-1");

Parameters:

  • encoding name.