RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBookmarkList.Refresh Method

Removes all invalid bookmarks from the Items property array.

Pascal
function Refresh: Boolean;
C++
__fastcall Boolean Refresh();

Bookmarks in the bookmark list are not automatically deleted when records in the dataset are deleted. As a result, some bookmarks in the Items array may become invalid. Call Refresh to ensure that every bookmark in the bookmark list is valid. Refresh attempts to locate every record in the dataset that corresponds to a bookmark in the Items property array. All bookmarks that do not correspond to records in the dataset are removed.  

If any of the bookmarks in the list are invalid, Refresh returns true, and invalidates the DBGrid so that it will repaint, reflecting the removal of all invalid records. If all bookmarks in the list are still valid, Refresh returns false. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!