Hi David, I found this function to filter a table. It works but the table in AB2 needs to be refreshed to take effect.
The table only takes effect when I do click in any other part of the project.
If you know to refresh the table, please, let me know. Many thanks David :)
You no need to filter the table itself (the HTML markup), but the Table's "data" property. Whatever change you do into the "data" propery is automatically reflected in the table (HTML markup).
Originally we set the Array into the "table1.data" property, but, to filter the contents, we save a copy of the original "table1.data" in another variable, in this case "app.store.tableOriginalData". Now place a Text Input control in the "view1", below the Table, and, place the below code in his "KeyUp" event:
That's all. Run the app and type something in the new Text Input control: you must see that only the records who his name contains the query (the Input Text value) is shown in the table and not other records. It's more or less easy to expand the search to other fields, etc. Please, go ahead if you have some further questions!
Hi David, many thanks for the code. It works like a charm :P
Have a nice sunday
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.