Hi all
have a question regarding arrays.
I am in a specific situation and this requires a specific solution.
I am re-creating a grid and would like to hold controls in an array.
Therefore, the array has columns of textbox, checkbox (all pre-defined) and has rows of integer.
Have played around with this and the best solution is as follows:
Code:
Public Class Test_Array
Public m_items As new ArrayList
End Class
Code:
Dim aa(3) As Test_Array
aa(0) = New Test_Array
For Each ctrl In Me.Controls
aa(0).m_items.Add(ctrl)
Next
This works OK and is a simple example. But what I want to do is add the controls into the sub array by the following method:
Code:
aa(0).m_items(3).Add(ctrl)
But this does not work. Is there any way around this or another method I could use?
Thanks
ITflash