new Items(oRollist)
The Items object holds a collection of Item type (item of the control). Use the Items/GetItems() method to access the control's items collection.
Parameters:
Name | Type | Description |
---|---|---|
oRollist |
Rollist | Indicates an object of Rollist type that owns the collection |
Methods
Add(oItemOptsopt) → {Item}
The Add() method creates and adds a new item into the control. Use the Add() method of the Item object to a new child-item into the control.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
oItemOpts |
object |
<optional> |
Specifies the options to create the new item as an object of ItemOptions type |
Returns:
Returns the newly created item, as an object of Item type
- Type
- Item
Example
oRollist.Item.Add("caption"), adds a new item with the specified caption.
oRollist.Item.Add({value: "caption"}), adds a new item with the specified caption.
Add
Clear()
The Clear() method removes all items of the control and inits the control's scroll-bars
GetCount() → {number}
The GetCount() method returns the number of items within the collection
Returns:
Returns the number of items within the collection
- Type
- number
Example
The following statements are equivalents:
oRollist.Item.GetCount(), counts the items within the control
oRollist.Item.Count, counts the items within the control
where oRollist is an object of Rollist type
GetCount
Item(id) → {null|Item}
The Item() method gets the item giving its index, identifier/key or reference. The Item(id) method returns the item based on its index or identifier/key (equivalent of this method)
Parameters:
Name | Type | Description |
---|---|---|
id |
any | The id parameter could be any of the following:
|
Returns:
Returns null if the item is not found, or an object of Item type, if the items collection contains the giving id.
- Type
- null | Item
Remove(id)
The Remove() method removes an item from the collection.
Parameters:
Name | Type | Description |
---|---|---|
id |
any | The id parameter could be any of the following:
|
RemoveRange(range)
The RemoveRange() method removes multiple-items at once
Parameters:
Name | Type | Description |
---|---|---|
range |
any | Indicates an item, an array [{Item}], or an exontrol.Arr([{Item}]) |