P
Patrick Tingen
Guest
In a browse in our application, the user can select multiple records. The order of selecting the records is important here, because the records have to be processed in the order the user selects (production orders). If the user selects them one by one with the mouse, everything works fine. If the user drags a selection (selecting one record, then move the mouse up or down while holding mousebutton pressed) everything works ok, both up and down. If the user selects one record with the mouse, then shift-selects another record, things are getting less clear. If the secondly selected row is BELOW the first one, the order of selecting is ok. If the second row is ABOVE the first one, the order of selection is inverted. I created a small test program so you can play with it. You can find it here as a Github gist. If you run it, it will look like this: Select record nr 5 with the mouse, press SHIFT and select record nr 1. Then press the 'show order' button. This button just shows the order of selection: In this case it will show: This is strange, because I started with nr 5 and then extended the range to 1, so I would have expected the order to be exactly the reversed of this. As you can see, I experimented with capturing the state of the SHIFT key, so I could possibly revert the order of the records when the selection was done holding the SHIFT key, but is there a better way than this?
Continue reading...
Continue reading...