Skysnake Posted March 15 Share Posted March 15 (edited) Hi I have a combo with content which is the result of a SQL query. Problem is that AFTER populating the combo, user wants to sort the content. Any suggestions? I could add a button which would re-arrange the underlying array and re-populate the combo without going back to SQL. Any better, faster ideas? Thanks Skysnake Edited March 15 by Skysnake Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
Musashi Posted March 15 Share Posted March 15 (edited) 1 hour ago, Skysnake said: Problem is that AFTER populating the combo, user wants to sort the content. Any suggestions? In which order does the user want to sort (ascending, descending, natural sorting)? If this is known, you can sort the array before the combo box is populated (but you surely figured this out yourself ). In case the user wants an optional sorting, then a button, a select box or a HotKey should be required to trigger this. For more than one user, the respective preferences could be stored in an .ini file, for example. Not that much of a help, I am sorry . Edited March 15 by Musashi Answer extended "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Nine Posted March 15 Share Posted March 15 $CBS_SORT ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Skysnake Posted March 15 Author Share Posted March 15 😉 The combo actually contains Listview type data (multi column) --- the initial query returns the data in a predetermined sequence (ORDER BY), however now a user wants a different sort order. If I understand $CBS_SORT correctly this (very nifty switch) will force the default display to Automatically sorts strings added to the list box, and will override the initial SQL sequence. Not bad if alpha is all you need. I have decided on a SORT ICON, which will cycle through the different options ... my best solution so far. @Nine & @Musashi thank you for the interest. Skysnake Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now