huntpeck Posted December 13, 2021 Posted December 13, 2021 I am having an issue with the Listview extended sort. This is somewhat hard to explain so I have included screen shots that I hope help. This works ok with SimpleSort. Here are the sequence of events I used to run into the problem. 1) Display all rows of a table in a Listview 2) Run a search to display a subset of the table 3) Make a change to a field 4) Clear the search to display all of the records again 5) Sort the listview - Where the problem is It looks to me that when using the Listview extended sort the changed field does not follow the sort. It stays in the original row that was changed.disptable.au3 I have attached screen shots that hopefully illustrates the issue. I have also included the code if needed. sort_issue.docx
Moderators Melba23 Posted December 13, 2021 Moderators Posted December 13, 2021 huntpeck, It is unsurprising that you have problems. You initialise the ListView with the UDF - and then delete all the items and part fill the ListView with a selection of the original items. As I have explained many, many times in the main UDF thread, the UDF sets up a internal shadow array of the content once the ListView is initialised and doing virtually ANYTHING to the content using other than the UDF functions will lead to the ListView and the internal array no longer being synchronised - which is a guarantee for problems, as you have found. I will look at the script and see if I can come up with some way to code it so that the UDF can function correctly while maintaining the current functionality. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
huntpeck Posted December 13, 2021 Author Posted December 13, 2021 I'm fine if this is working as expected. I can use the simplesort because most of the tables I'm going to be using aren't very big. Don't want to create any extra work for you 🙂
Moderators Melba23 Posted December 13, 2021 Moderators Posted December 13, 2021 huntpeck, Looking at the code I think there need to be quite a few changes to make sure you do not run into problems. I have just the one question at the moment: after editing a selection of items do you return automatically to the full listing? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
huntpeck Posted December 13, 2021 Author Posted December 13, 2021 No - I show the rows that are currently in the listview. So if I searched and displayed 3 rows and made a change it would return with the 3 rows.
Moderators Melba23 Posted December 13, 2021 Moderators Posted December 13, 2021 huntpeck, Got it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Moderators Melba23 Posted December 14, 2021 Moderators Posted December 14, 2021 huntpeck, Here you go - it works fine for me: disptable_Mod.au3 Click on the headers to sort the columns - entering a blank search will display all items. I have not touched the initial data read and later commit code as I do not have a database on which to test. If you are wondering about the lack of colour of the "Commit" button - there is a bug deep in AutoIt which means that coloured buttons have all sorts of unwanted consequences - best not to do it. Please ask if you have any further questions. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
huntpeck Posted December 14, 2021 Author Posted December 14, 2021 Thanks so much! I'll let you know once I have time to test.
Moderators Melba23 Posted December 14, 2021 Moderators Posted December 14, 2021 huntpeck, My pleasure, as always. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
huntpeck Posted December 14, 2021 Author Posted December 14, 2021 Works like a charm! Thanks again for your help.
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