Gallery does not re-sort after changing a date
Here is a screenshot of the gallery:
The Items come from a Collection (filtered and sorted), and the Collection is populated from a Dataverse table. Here is the code for the Items property of the gallery.
This code is run when the user selects a Project from the combo box at the top. If necessary, I could also run this code when a date is changed, if there are no other options.
Here is the code in the OnChange property of the date selector to put in the newly selected date: I am updating both the local Collection (that is bound to the gallery items) and the underlying online database table in Dataverse, to permanently save the date change. Both request date and delivery date are updated. A column called DelDateSort is used for sorting. This column is pushed when the user selects the Combo box, and reports a delivery date if present, else use the request date. I am purposely updating this column in the Collection in the code below when the date is changed.