====== delete ====== .. js:function:: delete() **domain**: client **language**: javascript **class** :doc:`Item class ` Description =========== Deletes the active record and positions the cursor on the next record. The ``delete`` method * checks if item dataset is :doc:`active `, otherwise raises exception * checks if item dataset is not empty, otherwise raises exception * if item is a :doc:`detail ` , checks if the master item is in edit or insert :doc:`state `, otherwise raises exception. * if item is not a :doc:`detail ` , checks if it is in browse :doc:`state `, otherwise raises exception. * triggers the :doc:`on_before_delete ` event handler if one is defined for the item. * puts the item into delete :doc:`state ` * deletes the active record and positions the cursor on the next record * puts the item into browse :doc:`state ` * triggers the :doc:`on_after_delete ` event handler if one is defined for the item * updates :doc:`data-aware controls ` See also ======== :doc:`Modifying datasets `