Update of a RecList

With the RecView and the RecList, conzept 16 provides two objects with which data records of a table can be displayed very easily. Depending on the processing within the application, however, the data records that are to be displayed there change. In this case, it is essential to update the display objects. There are a number of update options available to the developer. In the following article, we would like to give you a brief insight into these options.


Fig. 1: Visible area of a table

The RecList object is optimized for displaying large tables. As a result, it is not possible to keep all existing data records in the working memory. For this reason, the RecList only keeps the visible records in the working memory (see Fig. 1).

The displayed records are read from the table record by record. The data records are read via the global data record buffer (analogous to RecRead()). This results in the field buffer values changing as a result of the display.

The mechanism described also applies to scrolling. Sentences are read according to the scroll direction.

If a line is selected in the RecList, not all fields of the data record buffer are filled with new values, but only those that are also entered in the RecList.
The following describes tasks and how they can be implemented using WinUpdate():
Task definition: Data records are displayed in a RecList. These records are now processed within the application. The data records that are to be displayed in the RecList change as a result of processing. The RecList must now be updated so that these data records are also visible within the RecList object. The data record already selected before processing should remain selected. This data record should also retain its position within the RecList.

tHdlRecLst->WinUpdate(_WinUpdOn, _WinLstFromSelected |
                      _WinLstRecDoSelect |
                      _WinLstPosSelected);

Explanation: The first option in the above excerpt is _WinLstFromSelected, which causes the RecList to be rebuilt based on the selected data set. The _WinLstRecDoSelect option gives the focus to the data record within the RecList that is currently in the field buffer. As the previously selected data record is still in the field buffer at this point, it will continue to be selected. Finally, _WinLstPosSelected is specified. As a result, the previously selected record retains its position within the list when the object is rebuilt.
Task definition: Data records are displayed in a RecList object. Within the list, the last data record should be displayed selected after processing, even if it is not in the visible area of the list at the time of processing. To do this, the record with the largest key value must be loaded via RecRead(_RecLast). Based on the buffer content, an update to the RecList must then be carried out and the current data record selected.
If the displayed data records are already sorted out according to a criterion in the EvtLstRecControl event, the last data record of the table must also be read and an update to the RecList must be carried out based on the buffer content. The RecList itself then determines whether this data record is displayed. If this is not the case, the data record with the next smallest key value is loaded. The system now checks again whether this data record is displayed. This is repeated until a data record is found that is displayed.

tRes # RecRead(tHdlRecLst>wpDbFileNo,
               tHdlRecLst->wpDbKeyNo, _RecLast);
tHdlRecLst->WinUpdate(_WinUpdOn, _WinLstRecFromBuffer |
                      _WinLstRecDoSelect);

Explanation: The option _WinLstRecFromBuffer ensures that the list is rebuilt starting from the value of the field buffer and _WinLstRecDoSelect focuses on this data record within the list.
Task definition: A specific data record is to be selected in a RecList. As a further condition, the data record is to be displayed at the bottom of the list. To accomplish this, it is not necessary to read the data set first and position it based on the buffer content. Here, access can be made via a specific key value; the corresponding value must be assigned to the key field. The prerequisite here is that the key matches the key specified in the wpDbKeyNo property.

// Article with article number 20034 is to be selected
ART.iNummer # 20034;
tHdlRecLst->WinUpdate(_WinUpdOn,
                      _WinLstRecFromBuffer|
                      _WinLstRecDoSelect |
                      _WinLstPosBottom);

Explanation: The update process here is similar to the previous example. The additionally specified option _WinLstPosBottom causes the data record in the field buffers to be positioned at the end of the visible area of the RecList.

Klicken Sie hier, um die Nutzungsbedingungen für unseren Blog zu lesen.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

Requests, questions or feedback are welcome:

Terms of use of the comment function in the blog

1. General information

Vectorsoft AG (‘Provider’) provides a public blog for Internet users (‘Users’) on the vectorsoft.de website. The public blog is intended for the exchange of information and ideas. Users who participate with contributions and comments undertake to comply with the blog terms of use and are responsible for the accuracy, appropriateness and freedom from legal infringements of their contributions. By using the comment function in our blog, you accept these terms of use.

2. Netiquette

We ask you to refrain from personal attacks and provocations based on other opinions. Please argue objectively and maintain a constructive discussion culture. Your comment should always be related to the topic in question in order to avoid digressions into other topics. Posting the same comment or several similar comments more than once is not permitted.

3. Prohibition of illegal content

By submitting your comment, you confirm that you are not violating any copyrights or other rights of third parties. Inciting, racist statements, instructions for criminal offences and their glorification, depictions of violence, pornographic content and statements that violate personal rights are prohibited.

4. No advertising

The use of the comment function is not permitted for commercial or party-political purposes. Advertising contributions of any kind will be deleted immediately.

5. Details of the name

When entering your name, pay attention to the principles mentioned above.

6. Source references

If you intend to publish quotes or contributions from third parties, please indicate the respective sources and explain how they relate to the blog post.

7. Violation of the terms of use

Posts that violate this policy will be deleted immediately. If you notice any violations yourself, please send us the link to the comment in question by e-mail to . We expressly point out that we will exclude individual users in the event of repeated or serious violations of these terms of use.

As of: Sept. 2024

Get your Trial Version now!

Test yeet free of charge

IHRE EVALUIERUNGSLIZENZ - JETZT ANFORDERN!

TESTEN SIE DIE CONZEPT 16 VOLLVERSION - UNVERBINDLICH und KOSTENFREI

Subscribe to our newsletter

[cleverreach_signup]
WordPress Cookie Notice by Real Cookie Banner