View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005041 | JEDI VCL | 00 JVCL Components | public | 2009-12-02 21:18 | 2011-06-10 16:10 |
Reporter | VideoRipper | Assigned To | AHUser | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.33 | ||||
Target Version | Fixed in Version | 3.40 | |||
Summary | 0005041: TJvDBFindEdit: FTimer triggers after ResetFilter | ||||
Description | When a user searches for a particular record in a TDataSet using a TJvDBFindEdit and there are matches, those records are shown as expected. When the user clears the filter (using .ResetFilter), the dataset jumps to the first record in the (unfiltered) dataset, which is also as expected. However, it would be nice if, when a certain record is selected in the dataset and the filter is reset, the selected record stays the selected one. | ||||
Additional Information | I thought I could do it like this: [CODE] MyFindEdit.FindMode := fmAnyPos; MyFindEdit.FindStyle := fsFilter; // procedure TDataForm.ActionFindClearExecute(Sender: TObject); Var B : TBookmark; begin B := MyTable.GetBookmark; Try MyFindEdit.ResetFilter; MyTable.GotoBookmark(B); Finally MyTable.FreeBookmark(B); End; end; [/CODE] Unfortunately, this doesn't seem to work: since the overriden "Change"-procedure is called after resetting the filter, FTimer is enabled and the dataset jumps to the first record when the timer is triggered. It would be nice if the timer is not triggered, so that the bookmarked record is selected after the reset. I added a small published procedure that enables me to disable the timer when desired, though it actually is a quick hack; maybe a better solution can be found. [CODE JvDBFindEdit.pas] Type TJvDBFindEdit = class(TJvMaskEdit) // public // Procedure DisableTimer; // End; // Implementation // Procedure TJvDBFindEdit.DisableTimer; Begin FTimer.Enabled := False; End; // End. [/CODE] Now I can really jump to the selected record after a .ResetFilter: [CODE] MyFindEdit.FindMode := fmAnyPos; MyFindEdit.FindStyle := fsFilter; // procedure TDataForm.ActionFindClearExecute(Sender: TObject); Var B : TBookmark; begin B := MyTable.GetBookmark; Try MyFindEdit.ResetFilter; MyFindEdit.DisableTimer; MyTable.GotoBookmark(B); Finally MyTable.FreeBookmark(B); End; end; [/CODE] Greetz, Peter. | ||||
Tags | No tags attached. | ||||
|
Please send us the zipped sources of a sample application showing this |
2009-12-04 16:19
|
Jedi-5041.zip (6,659 bytes) |
|
Sample application and modified version of "JvDBFindEdit.pas" attached. |
|
Fixed in SVN revision 12793 The ResetFilter() function doesn't trigger the timer anymore. If the developer explicitly wants to reset the filter he should get what he wants immediately. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-12-02 21:18 | VideoRipper | New Issue | |
2009-12-04 15:30 | obones | Note Added: 0016949 | |
2009-12-04 15:30 | obones | Status | new => feedback |
2009-12-04 16:19 | VideoRipper | File Added: Jedi-5041.zip | |
2009-12-04 16:20 | VideoRipper | Note Added: 0016966 | |
2010-06-07 13:55 | obones | Status | feedback => acknowledged |
2010-06-07 16:19 | AHUser | Note Added: 0017464 | |
2010-06-07 16:19 | AHUser | Status | acknowledged => resolved |
2010-06-07 16:19 | AHUser | Fixed in Version | => Daily / SVN |
2010-06-07 16:19 | AHUser | Resolution | open => fixed |
2010-06-07 16:19 | AHUser | Assigned To | => AHUser |
2011-06-10 16:10 | obones | Fixed in Version | Daily / SVN => 3.40 |