ComponentOne List 8.0 for ActiveX
Unbound Mode Bookmarks

In unbound mode, as in application mode, a bookmark is a variant supplied by your application and used by the list as a means of uniquely identifying a row of data to be displayed or modified.

Just as your application must provide, store, and maintain the data for the unbound list, you must deal similarly with the bookmarks. The bookmarks themselves must be supplied by your code as variant data in the following events:

You are free to use whatever you choose for the purpose of identifying a row, but keep in mind that the bookmarks must be unique for each row. In general, you will also want to be able to search for the associated record quickly when given a bookmark. That is, when the list gives you a bookmark, asking for information about a particular row in your dataset, you should be able to locate the row the list is asking for quickly. An important concept to remember is that whatever you supply to the list as a bookmark for a particular row, that is how the list will refer to that row later on. Three common examples of what to use for bookmarks are:

  1. If you use the unbound list with a proprietary database, you can use the values of a unique key field as bookmarks. That way, when given a bookmark, you can search and retrieve the associated record quickly.

  2. If the database you use supports unique row IDs or record numbers, these can be conveniently used as bookmarks.

  3. If you use the list to display an array, the array's row index is an obvious choice for bookmarks.

Bookmarks cannot exceed 255 characters in length. Since Visual Basic 5.0 uses 2 bytes per character, this means that string bookmarks cannot exceed 127 characters.

True DBList's unbound modes support string, integral, and floating point bookmarks. All other data types must be converted to strings before they are passed to the list as variant bookmarks.

Since True DBList and Visual Basic differ in their treatment of bookmarks, some restrictions apply when manipulating them in code. For more information, see Application Mode Bookmarks.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback