Check documentation for the latest version of dhtmlxSuite DataAction Object DHTMLX Docs

DataAction Object

add_field()

allows you to register field for usage while INSERT/UPDATE/DELETE operation.

$action->add_field($name,$value);

Parameters:

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

See also:

error()

marks provided data as invalid and cancels default UPDATE processing (invalid record will be highlighted in red bold font).

$action->error()

Parameters:

  • none

See Also:

get_data()

returns hash of data values that will take part in INSERT/UPDATE/DELETE operations.

$action->get_data();

Parameters:

  • none.

get_id()

returns the id of the currently selected record.

$action->get_id();

Parameters:

  • none.

get_new_id()

returns the ID received after INSERT operation (valid for afterProcessing event only).

$action->get_new_id()

Parameters:

  • none.

Returns:

  • the id of the record

get_status()

returns action type of the item.

$action->get_status()

Returns:

  • update, insert, delete, error or custom status set through set_status() method

Parameters:

  • none.

See Also:

get_value()

returns value of a field.

$action->get_value($name);

Parameters:

  • $name - name of column or alias.

See Also:

invalid()

marks provided data as invalid and cancels default UPDATE processing (invalid record will be highlighted in bold font).

$action->invalid()

Parameters:

  • none.

See Also:

remove_field()

allows to remove one of default fields from INSERT/UPDATE/DELETE operation.

$action->remove_field($name,$value);

Parameters:

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

See Also:

set_new_id()

sets a new ID for a record

$action->set_new_id($id)

Parameters:

  • $id - a new id to be set for the record

set_response_attribute()

allows you to define custom attribute which will be added to the related action tag in XML response.

$action->set_response_attribute($name,$value);

Parameters:

  • $name - name of the attribute.
  • $value - value of the attribute in question.

See Also:

set_response_text()

allows you to set string that will be included in response

$action->set_response_text($text);

Parameters:

  • $text - any text value that will be returned on client-side with related action.

See Also:

set_response_xml()

allows you to set xml-string that will be included in response (if you need to provide just a text - use set_response_text() method).

$action->set_response_xml($text);

Parameters:

  • $text - any text value that will be returned on client-side with related action.

See Also:

set_status()

sets the status of operation.

$action->set_status($value)

Parameters:

  • $value - status of operation.

It can be either some predefined value (updated, inserted, deleted, error) or any custom status. Beware, when you set custom status you cancel default data processing.

See Also:

set_value()

sets value of a field.

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

Parameters:

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

See Also:

success()

confirms that operation has been executed correctly and cancels any default data processing.

$action->success()

Parameters:

  • in case INSERT operation: a new ID of element ( which will be updated on client-side )

See also:

Back to top