I am trying to use the SortCollection() function to sort the "SortOrder" column in the DataGridView but I am not having any luck. Does anyone have an example how to use this?
Here is an example that I tried but is not working:
Dim Quantity As Integer = Me.QuoteDocuments.Quantity
For i As Integer = 1 To Quantity
Not fully understand what result you want to get but I suppose that you need to do something like this:
1. To create news connection, name it like SortedQuotes.
2. In the Formula tab you need to write something like.
Dim col_ret As New Collection For Each item As Object In Me.Subparts("QuoteDocuments") col_ret.Add(item) Next Item Result = SortObjectsByProperty(col_ret, "SortOrder")
That should be the way to show sorted QuoteDocuments on the UI.
I believe that is your goal.
Not sure that the synthax is 100% correct.
Here are my other attempts:
Can you see what I am doing wrong? or if you could write an example that would be helpful too.