allows setting custom flag for a data item.
id | string | the id of a data item to mark |
name | string | the flag name |
css | boolean | if set to true than the css style with the name equal to the name parameter value will be applied to the marked item |
value | any | the value of the flag |
any | the flag value |
//adds flag 'invaid = true' for the item with 'id=2'.
//applies to this item css style ".invalid"
$$("dtable").addMark(2, "invalid", true, true); // returns 'true'
The method adds some info (as a key/value pair) related to a data item, marking the item thereby. The added information is stored separately from main data. So if you, for example, load data from one data store to multiple components, the mark will exist just for a data item of the calling component.
The method can be called in 3 ways:
addMark(id, name) //-> 'css' is set to <i>false</i>, 'value' - to <i>true</i>
addMark(id, name, css) //-> 'value' is set to <i>true</i>
addMark(id, name, css, value)