|Anonymous | Login | Signup for a new account||2019-04-20 11:26 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0004350||[JEDI VCL] 00 JVCL Components||minor||always||2008-03-03 19:49||2008-03-04 04:25|
|Summary||0004350: TJvUltimGrid Search "Focus Error" when searching records and grid is not visible.|
On an application, I usually have a panel where the user can type text that will be searched incrementally (using the grids Search function). Below that, I have a page control that has one page with the the data in a grid (TJvUltimGrid Component) and another page where the current record is displayed in a Form View.
When the "Grid page" is displayed, the search is done correctly, the correct record is found and the cursor an the grid is visible on the current record.
The problem is when the "From view" page is displayed instead of the "grid page". In this case I get an error that a not visible control cannot be focused. If I set the "Focus" parameter of the function to False, the search does not seem to work and the record is not positioned accordingly.
The functions source code is:
function TJvDBUltimGrid.Search(const ValueToSearch: Variant; var ResultCol: Integer;
var ResultField: TField; const CaseSensitive, WholeFieldOnly, Focus: Boolean): Boolean;
Result := False;
if (SearchFields.Count > 0) and (ValueToSearch <> Null) and (ValueToSearch <> '') then
FValueToSearch := ValueToSearch;
Result := PrivateSearch(ResultCol, ResultField, CaseSensitive, WholeFieldOnly, False);
if Result and Focus then
Self.Col := ResultCol;
if Self.Visible then
If I change the Line:
if Self.Visible then
if Self.Visible and Self.CanFocus then
then it all works correctly as it should.
If this code change does not break any other thing that I am not aware of, could you please add this minor change to the next version?
|Tags||No tags attached.|
|2008-03-03 19:49||jay||New Issue|
|2008-03-04 04:24||obones||Status||new => resolved|
|2008-03-04 04:24||obones||Fixed in Version||=> Daily / SVN|
|2008-03-04 04:24||obones||Resolution||open => fixed|
|2008-03-04 04:24||obones||Assigned To||=> obones|
|2008-03-04 04:24||obones||Note Added: 0014270|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|