Maven4Champ
Technical User
- Jun 16, 2004
- 154
Hi all,
I have a very general question that I hope to find assistance on.
I have a Grid View that is populated with two columns (resp_key and resp_name). I want to loop through this gridview and add the values to a 2-dimensional array (2 columns w/ varying number of rows). From there I want to compare the values in the array to a specific string value. When it finds a match in the string value (resp_key), it display the array item of resp_name.
Data in Grid view is as follows:
resp_key resp_name
ar_key1 Accounts Receivable
ap_key2 Accounts Payable
inv_key3 Inventory
I would like to place those values in an array (dynamically) however I don't always know the number of rows I will have but the # of columns will always and only be 2.
So my psudo-logic is as follows:
Dim 2dimArray As 2-Dimensional Array
For each DataViewRow in DataView
2dimArray.Add(dataviewrow.item(0), datarowview.item(1))
Next
This would essentially provide me with an array as follows:
Print 2dimArray(0, 0) = ar_key1 , Accounts Receivable
Amy advice as I am not very well educated on arrays in VB.NET and how to construct a dynamic multi-dimensional array.
Thanks!
I have a very general question that I hope to find assistance on.
I have a Grid View that is populated with two columns (resp_key and resp_name). I want to loop through this gridview and add the values to a 2-dimensional array (2 columns w/ varying number of rows). From there I want to compare the values in the array to a specific string value. When it finds a match in the string value (resp_key), it display the array item of resp_name.
Data in Grid view is as follows:
resp_key resp_name
ar_key1 Accounts Receivable
ap_key2 Accounts Payable
inv_key3 Inventory
I would like to place those values in an array (dynamically) however I don't always know the number of rows I will have but the # of columns will always and only be 2.
So my psudo-logic is as follows:
Dim 2dimArray As 2-Dimensional Array
For each DataViewRow in DataView
2dimArray.Add(dataviewrow.item(0), datarowview.item(1))
Next
This would essentially provide me with an array as follows:
Print 2dimArray(0, 0) = ar_key1 , Accounts Receivable
Amy advice as I am not very well educated on arrays in VB.NET and how to construct a dynamic multi-dimensional array.
Thanks!