After being frustrated with trying to find a solution in vb with a sqldatasource in order to save the reordered list, I figured it out and is pretty straight forward. Here is how to do it in codebehind (for this example you must have the Reorder List AutoPostback="true"). This is all done from the ItemReorder event. This may seem long but is not bad. My example uses an extra field in the database for client ID since each client has their own.
Protected Sub ReorderList1_ItemReorder(ByVal sender As Object, ByVal e As AjaxControlToolkit.ReorderListItemReorderEventArgs) Handles ReorderList1.ItemReorder
'get Old Priority
Dim oldI As Integer = e.OldIndex
'get New Priority
Dim newI As Integer = e.NewIndex
'get the selected Item Value
Dim selectedDK As String = ReorderList1.DataKeys(oldI).ToString()
Dim i2updateList As String = ""
'Build update list based on everything after/equal to the new priority but not equal to the selected one and in order so they can be updated in order
Using oConn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ibmas terConnectionString").ConnectionString)
Dim sqlCmd As New SqlCommand("select id from client_todolist where id <> '" & selectedDK & "' and client_id='111193' and priority >= '" & newI & "' order by priority asc", oConn)
oConn.Open()
Using reader As SqlDataReader = sqlCmd.ExecuteReader()
While reader.Read()
If i2updateList = "" Then
i2updateList = reader("id").ToString
Else
i2updateList &= "," & reader("id").ToString()
End If
End While
End Using
End Using
Dim newPriority As Integer = newI
Dim rolArr As String()
rolArr = i2updateList.Split(",")
'update each from the list by 1
For Each x In rolArr
newPriority = newPriority + 1
Using myConnection As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ibmas terConnectionString").ConnectionString)
myConnection.Open()
Dim myCommand As SqlCommand = New SqlCommand("update client_todolist set priority = '" & newPriority & "' where id='" & x & "'", myConnection)
myCommand.ExecuteNonQuery()
End Using
newPriority = newPriority
Next
'finally, update the selected one for its changed priority
Using myConnection As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ibmas terConnectionString").ConnectionString)
myConnection.Open()
Dim myCommand As SqlCommand = New SqlCommand("update client_todolist set priority = '" & newI.ToString() & "' where id='" & selectedDK & "'", myConnection)
myCommand.ExecuteNonQuery()
End Using
End Sub