I have a gallery to show items which task status is Completed. When I initially open the app, it shows as shown below:

Only I click the sort button, it shows the desired result as shown below.

Here is the code I'm adding in gallery Item:

How can I show the desired result when initially open the app?