Search
ObservableCollection.removeRange Method
See Also
 






Deletes a range of items from the collection.

Namespace: MindFusion.Common.Collections
File: ObservableCollection.js

 Syntax

JavaScript  Copy Code

function removeRange (index, count)

 Parameters

index

Number. The starting index of the range to remove.

count

Number. The length of the range to remove.

 Example

The following code checks if the List with items in a ListView is more than 100 and if yes - leaves only 50 of them.

JavaScript  Copy Code
if(listView.items().count > 100)
   products.removeRange(50, listView.items().count() - 1);

 See Also