DataArea.deleteItemByKey

Syntax

deleteItemByKey(key: String, withDispose: Boolean);

Parameters

key. Key of the dictionary, whose containing tab you want to remove.

withDispose. Indication of deleting controls in the container data area. If this parameter is true (default), the controls are deleted, otherwise they are not.

Description

The deleteItemByKey method deletes tab by specified key of MDM dictionary stored in this tab.

Example

To execute this example, the page must contain the DictionaryBox component named dictionaryBox (see Example of creating the DictionaryBox component ). Remove the current tab in the container data area:

// Get dictionary data area
var dataArea = dictionaryBox.getDataArea();
// Get key of the first open dictionary
var key = dictionaryBox.getSource()[0].getKey();
// Delete the current tab containing the dictionary
dataArea.deleteItemByKey(key);

After executing the example the current tab in the container data area is removed:

See also:

DataArea