Use the #avListManager.DataItemsbyUII or #avListManager.DataItemsbyKey collections.
DataItemsbyUII is the list items in the ordered they were created.
DataItemsbyKey is the list items in their composite alphanumeric key order.
Note that this means that numeric keys will probably not be in numeric order.
For example:
For Each(#DataItem) In(#AVLISTMANAGER.DataItemsbyUII)
If (#DataItem *IsNot *null) /* Always include this check */
If (#DataItem.avIsSelected)
#Sys_web.Alert Caption(#DataItem.avVisualID1 + ' is selected.')
Endif
Endif
Endfor
Always include the *NULL check.
Never keep list item references in your own code because your application will leak.