MindFusion.Charting for JavaScript Programmer's Guide
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

Type: Number
Number. The starting index of the range to remove.

count

Type: Number
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

ObservableCollection Members
ObservableCollection Class
MindFusion.Common.Collections Namespace