View Issue Details

IDProjectCategoryView StatusLast Update
0004361JEDI VCL00 JVCL Componentspublic2008-08-12 01:34
ReportermooreAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.33 
Target VersionFixed in Version3.35 
Summary0004361: FixedCols and up/down keys error in JvDBGrid
DescriptionJust put the FixedCols property to 1 and add some records, then scroll with the down or up keys, the focus always goes to the first non fixed col even if you are in the third col for example, putting FixedCols to 0 the error disappears,

Addes sample project showing the issue..
TagsNo tags attached.

Activities

2008-05-28 04:31

 

Projects.zip (1,448 bytes)

obones

2008-07-23 07:08

administrator   ~0014420

I'm seeing it just fine, but I can't figure out why it is happening.

franklinhaut

2008-07-24 05:28

reporter   ~0014457

Hi, maybe I can help...

this workaround has solved the problem, but I don´t now if cause other problem...

I just commented the BeginUpdate and EndUpdate of procedure DoSelection on run/JvDbGrid.pas

-------- CODE ---------

procedure DoSelection(Select: Boolean; Direction: Integer);
  var
    AddAfter: Boolean;
  begin
    AddAfter := False;
// BeginUpdate;
    try
      if MultiSelect and DataLink.Active then
        if Select and (Shift * KeyboardShiftStates = [ssShift]) then
        begin
          if not FSelecting then
          begin
            {$IFDEF CLR}
            FSelectionAnchor := GetNonPublicProperty(SelectedRows, 'CurrentRow') as TBookmarkStr;
            {$ELSE}
            FSelectionAnchor := TBookmarks(SelectedRows).CurrentRow;
            {$ENDIF CLR}
            SelectedRows.CurrentRowSelected := True;
            FSelecting := True;
            AddAfter := True;
          end
          else
          begin
            {$IFDEF CLR}
            AddAfter := DataSource.DataSet.CompareBookmarkStr(GetNonPublicProperty(SelectedRows, 'CurrentRow') as TBookmarkStr,
              FSelectionAnchor) <> -Direction;
            if AddAfter then
              SelectedRows.CurrentRowSelected := False;
            {$ELSE}
            with TBookmarks(SelectedRows) do
            begin
              AddAfter := Compare(CurrentRow, FSelectionAnchor) <> -Direction;
              if not AddAfter then
                CurrentRowSelected := False;
            end;
            {$ENDIF CLR}
          end;
        end
        else
          ClearSelections;
      if Direction <> 0 then
        DataLink.DataSet.MoveBy(Direction);
      if AddAfter then
        SelectedRows.CurrentRowSelected := True;
    finally
// EndUpdate;
    end;
  end;

obones

2008-08-12 01:32

administrator   ~0014496

This is now in SVN

Issue History

Date Modified Username Field Change
2008-05-28 04:31 moore New Issue
2008-05-28 04:31 moore File Added: Projects.zip
2008-05-29 02:45 obones Status new => acknowledged
2008-07-23 06:54 obones Status acknowledged => confirmed
2008-07-23 07:08 obones Note Added: 0014420
2008-07-24 05:28 franklinhaut Note Added: 0014457
2008-08-12 01:32 obones Status confirmed => resolved
2008-08-12 01:32 obones Fixed in Version => Daily / SVN
2008-08-12 01:32 obones Resolution open => fixed
2008-08-12 01:32 obones Assigned To => obones
2008-08-12 01:32 obones Note Added: 0014496