So first half of code table will look like this:
Username | Amount | Rank
jsmith | 30 | 1
jdoe | 30 | 2
and halfway through the code i wish to add to this so it looks like this:
Username | Amount | Rank | OrderCount
jsmith | 30 | 1 | 15
jdoe | 30 | 2 | 20
I'm figuring i'll have to use a for loop to loop through the table and add the OrderCount numbers to the specific row, but i'm not sure about how to add that extra column in and making sure the OrderCount gets added to the correct row.
So, i have this so far. "assignedAmount" will go into the "OrderCount" column
Expand|Select|Wrap|Line Numbers
- Dim OrderCol As DataColumn = users.Columns.Add("OrderCount")
- For a = 0 To users.Rows.Count - 1
- assignedAmount = ReturnAssignedAmount(users.Rows(a).Item("Username"))
- users.Rows(a).Item("OrderCount")
- Next
- users.AcceptChanges()