Object Reference > True DBGrid Methods > GetBookmark Method |
GetBookmark Method
The GetBookmark method returns a bookmark for a row relative to the current row, which need not be visible.
object.GetBookmark (offset)
Arguments
offset is a long integer that defines the target row relative to the current row.
Return Value
A variant containing a bookmark relative to the current row as specified by offset.
If offset is 0, this method returns the bookmark of the current row. The value returned will be the same as that returned by the Bookmark property.
If offset is 1, this method returns the bookmark of the row following the current row. Similarly, if offset is -1, this method returns the bookmark of the row preceding the current row.
If offset is an arbitrary integer N, this method returns the bookmark of the Nth row following the current row if N is positive, or preceding the current row if N is negative.
If offset targets a row after the last available record or before the first available record, then this method returns Null.
Note
Do not confuse the GetBookmark method with the RowBookmark method, which can only return bookmarks for visible rows.