this should be simple enough... what is the correct way to loop through an arraylist?
Code:Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim CorpGroups As ArrayList = Groups.GetGroupNums PrintValues(CorpGroups) With Me.DataGridView1 .DataSource = CorpGroups End With End Sub Public Shared Sub PrintValues(ByVal myList As IEnumerable) Dim myEnumerator As System.Collections.IEnumerator = myList.GetEnumerator() While myEnumerator.MoveNext() Console.Write(ControlChars.Tab + "{0}", myEnumerator.Current) End While Console.WriteLine() End Sub
Console.Write outputs this:
GroupReportsFolderCreator.Groups
but the GridView has the correct info:
Code:corp_num group_num 123 1586 123 1587




Reply With Quote