I have a requirement that a SPList should be sorted by the "Priority" field (number field, no limits) when a ListItem is added or updated.
The sort should work as this:
Original Inserted item Modified
1 1
2 2 2
3 3 (old 2)
4 (old 3)
Edited: This behaviour is primary for improving the user experience when editing data in the data sheet view. It is a sort of a poor mans AJAX style updates that I am trying to get.
The only solution I see right now is to use an event handler and update the ListItems that should be deprioritized, however that could be a fairly costly operation on a list with hundreds of items (unless there are gaps in the sequence).
Have I missed the obvious solution, or a far better scaling way?
tia