View Issue Details

IDProjectCategoryView StatusLast Update
0004350JEDI VCL00 JVCL Componentspublic2008-03-04 04:25
ReporterjayAssigned Toobones 
Status resolvedResolutionfixed 
Product Version3.32 
Target VersionFixed in Version3.34 
Summary0004350: TJvUltimGrid Search "Focus Error" when searching records and grid is not visible.
DescriptionOn 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?

Jose Ostos

TagsNo tags attached.



2008-03-04 04:24

administrator   ~0014270

This is now added in SVN (r11746)

Issue History

Date Modified Username Field Change
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