WINDEV Mobile Concepts

Part 3: Databases 57 Table/Looper controls Table/Looper controls can be used to display a set of information (e.g., the content of a data file). The content of these controls can come from different sources: • Table/Looper control with direct access to the data source. • Table/Looper control populated programmatically. • Table/Looper control with in-memory data source. Remark : These three modes will be explained in detail for the Table control. However, the same concepts apply to the Looper control. Table control with direct access to the data source A Table control with direct access to the data source displays data directly from a data file, query or array variable. When you loop through the data file, the data is displayed in the Table control. The data file is read for each row displayed: the record that is read is displayed in a row of the Table control. Customer file The displayed data that is not linked to the data file is lost when the row is refreshed (e.g., value of a check box column). The number of records displayed in the control can be limited by setting a filter ( HFilter used in the control initialization code). The WLanguage functions starting with "Table" are used to handle Table controls with direct access to the data source. When a row is added to or deleted from the Table control, the record in the bound data file is also added or deleted. Table control populated programmatically In this case, the Table control directly displays the data loaded in memory. The data is added to the Table control through programming (using TableAddLine , for example). Data in memory Since the data is in memory, you can perform different types of operations on the Table control (e.g., sort or search for data in the columns, etc.).

RkJQdWJsaXNoZXIy NDQ0OA==