tp.List

tp.List is an Array subclass with Tripous list operations and optional list events. It can be used like a normal JavaScript array, but it also provides methods such as Add(), Insert(), RemoveAt(), Assign(), AddRange(), FindBy(), and RemoveBy().

Events are disabled by default. Set EventsEnabled = true to receive Changing and Changed events. A batch update can suppress intermediate event notifications by setting Updating = true while multiple changes are made.

Current list

The list contains small objects with Id, Name, and Country properties.


                        

Add and remove

These buttons use Add(), Insert(), RemoveAt(), AddRange(), and Assign().

Find and enumerate

FindBy(), ContainsBy(), IndexBy(), and RemoveBy() operate on object properties. GetEnumerator() returns a classic enumerator.

Events and update

Events use tp.ListEventArgs. The Updating flag suppresses intermediate events and emits a final Update changed event.