select

selects the specified item(s)

void select(string| array id,boolean preserve);

Parameters

idstring| arraythe id of a single item or an array of items ids
preservebooleanif it's set to true, the method won't affect the existing selection (will select new items but preserve selection of old items). The default value - false

Example

webix.ui({
    view:"dataview",
    id:"data",
    // ...
});
$$('data').select(2);               //selects an item with the id=2
$$('data').select(3, true);         //selects an extra item, preserving previos selection
 
$$('data').select([2,3,5]);         //selects a group of items with ids: 2,3,5

Related samples

Details

If the parameters aren't specified, all items will be selected.

    $$('data').select();                     //selects all items
See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix js framework and page of javascript list product.