In my dataset at location dshistory.Tables("History").Rows(x).Item(0) I record names and at location dshistory.Tables("History").Rows(x).Item(4)
I want to build a form that displays rankings but I'm unsure how to retrieve the data in the order I want it. So the steps I need to take are:
1. Iterate through dshistory.Tables("History").Rows(x).Item(4)
2. Get the 10 largest numbers from dshistory.Tables("History").Rows(x).Item(4)
3. Sort those 10 results from Largest to Smallest
3. Display the sorted results in a control be it a label, listbox, whatever.
So I would have something like:
How to do steps 2 and 3?
I want to build a form that displays rankings but I'm unsure how to retrieve the data in the order I want it. So the steps I need to take are:
1. Iterate through dshistory.Tables("History").Rows(x).Item(4)
2. Get the 10 largest numbers from dshistory.Tables("History").Rows(x).Item(4)
3. Sort those 10 results from Largest to Smallest
3. Display the sorted results in a control be it a label, listbox, whatever.
So I would have something like:
Code:
For x = 0 To dshistory.Tables("History").Rows.Count - 1
'get the list
'do the sorting
Next
'display the results
Label1.Text = results