There are four dataset methods that navigate among records in a filtered dataset. The following table lists these methods and describes what they do:
Filtered dataset navigational methods
Method |
Purpose |
FindFirst |
Move to the first record that matches the current filter criteria. The search for the first matching record always begins at the first record in the unfiltered dataset. |
FindLast |
Move to the last record that matches the current filter criteria. |
FindNext |
Moves from the current record in the filtered dataset to the next one. |
FindPrior |
Move from the current record in the filtered dataset to the previous one. |
For example, the following statement finds the first filtered record in a dataset:
DataSet1.FindFirst;
DataSet1->FindFirst();
Provided that you set the Filter property or create an OnFilterRecord event handler for your application, these methods position the cursor on the specified record regardless of whether filtering is currently enabled. If you call these methods when filtering is not enabled, then they
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|