PropertiesLoading not false as soon as table load completes

I have a screen with a table and about 10 buttons. The table displays data from the database depending on which button the user clicks on. Each button changes the query that the table is bound to. A few of them take some time to load, so I put a label over the table to display loading information.

I just bound the label’s visible property to the tables propertiesLoading property. It all works just fine unless a user clicks on a button that runs a long query, then while that query is loading they click on a button that runs a quick query. The table loads the data from the quick query, but the loading label is still visible over the table data for a while.

I checked the value of the tables propertiesLoading and it gets incremented each time a user hits a new query button and is not zero again until all the queries have completed running even though the table is only really loading the last query.

Is there a bitter way for me to handle this so when the table is finished loading the query it is going to display, that my label visible property is set to false?

Yes, the behavior you are describing is accurate, if suboptimal. This might be improved in the future, but it isn’t immediately obvious how it would be done, so in the meantime…

You can just have your own “loading” flag as a dynamic property. Have the buttons set it to true, and have the property change event on the table for the “data” property set it back to false.

Thanks Carl. That works just fine.