I currently have a table(/grid) of data that I can page, filter and sort. On the table I also have a built in checkbox column. Paging, filtering and sorting right now happen within the SQL query. What I want to be able to do is sort by the clicked items in my checkbox column. This would bring all items that are checked to the front of the table. Since the checkboxes themselves are all client side I can't just tell the SQL query to sort by a column that doesn't exist (maybe I need to dynamically create one?)
In essence what I think would happen is that the checked boxes ID value would be sent into the query the the SQL query itself would somehow know to sort by that first and then by the others specified.
Something like, where 1, 2, and 3 are clicked:
SELECT * FROM Blah ORDER BY (SELECT ID FROM Blah WHERE ID IN (1,2,3)), AnotherColumnToSort
That's the plan anyway, anyone have any ideas on how to actually accomplish that?
Update: Smack I'm on an Oracle DB and not SQL Server like I had thought.