Vcl.DBGrids.TBookmarkList.Refresh

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function  Refresh: Boolean;// drop orphaned bookmarks; True = orphans found

C++

bool __fastcall Refresh();

Properties

Type Visibility Source Unit Parent
function public
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TBookmarkList

Description

Removes all invalid bookmarks from the Items property array.

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.

See Also