Strange advgrid redraw problem - 2 -

Good mornig to all,

in advstringgrid version 8.3.2.6 this problem (discussed in august 2017) still exist.

When i scroll the grid with mouse wheel or with mouse while left button is pressed the grid redraw still (flashing, better, all the grid is drawed and, in a second time, only the visible columns are drowed).

Have you any news about this?



There's a new "problem" with the grid.

It's regards the DisjunctRowSelect setting.

In checkbox onclick event i have



procedure TFORM1.CHK1Click(Sender: TObject);

begin

SG2.MouseActions.DisjunctRowSelect:=CHK1.Checked;

ActiveControl:=SG2;

end;



What append is, if is true, that control is passed to the grid (SG2 is TAdvStringGrid) but the row color (on the current row) is missed.

If it is false, the control is returned to the grid and the current row is draw with the setted color.

Defautl grid options with goRowSelect:=True.



Thank's for all



Daniele

  1. I have retested wheel scroll with the latest version v8.3.3.0 but I could not see any issue.

    2) This is by design. When disjunct row select is not enabled, but row selection is enabled, there is at least always one row selected when the grid gets focus.

Good morning Bruno,

thank you for replt and excuse me for this.

1) About the grid, could be a local problem (even if the exe on different pc have the same blink redraw problem), is important to specify that happend in this situation:

- goRowselect,KeepHorizScroll are on, the grid's columns width is greater then grid's width, the first visible column on the left is not the first one. In this case when you move the cursor with the mouse wheel or while the left mouse button is pressed, the draw problem occours. If you set off KeepHorizScroll, no problem occours.

This have a sense because with KeepHorizScroll set to true the controls redraws the grid from the first column and in a second time redraw the grid from the first visible column.

Can you see in this direction ??



2) OK, thank's.



3) [New one] when the cursor is on the first / last row and the PagUp/PagDw keys are pressed, the grid is always redraw; With a simple control on first/last row you can avoid this.



Bruno, thank's for your help



Regards



Daniele

I have retested this here with a default grid on the form with code:


procedure TForm1.FormCreate(Sender: TObject);
begin
  AdvStringGrid1.RowCount := 10000;
  AdvStringGrid1.ColCount := 20;
  AdvStringGrid1.LinearFill(False);
  AdvStringGrid1.Navigation.KeepHorizScroll := true;
  AdvStringGrid1.Options := AdvStringGrid1.Options + [goRowSelect];
  AdvStringGrid1.LeftCol := 10;
end;

and I cannot see any problem here.

Please isolate this, provide sufficient details and preferably a sample source project based on the latest version of TAdvStringGrid with which we can reproduce the problem.

Good afternoon Bruno,

i try your code and works well .....

Can you tray this (new project, form and one advstringgrid with h Align as alclient)



procedure TForm1.FormCreate(Sender: TObject);

var I : Integer;

begin

AdvStringGrid1.RowCount := 10000;

AdvStringGrid1.ColCount := 20;

for I:=1 to AdvStringGrid1.ColCount - 1 do

                        AdvStringGridCells[I,0]:='Colonna ' + inttostr(I);

AdvStringGrid1.LinearFill(False);

AdvStringGrid1.Navigation.KeepHorizScroll := true;

AdvStringGrid1.Options := AdvStringGrid1.Options + [goRowSelect];

AdvStringGrid1.LeftCol := 10;

AdvStringGrid1.AutoSizeColumns(True);

end;

( Form width 518 resolution 1920x1080).

With this setting, when running, the first left column is 10th an the last (partially showed) is 16th.

Now with the mouse select any row and (while left button is down) go up (be sure to exit from the grid) .... all good.

Now (in the same conditions) move the mouse bottom and go to the bottom of the grid and exit from the control (form), now the cursor is moving down and .... when the scroll begin the grid (here) is drowed in wrong way (it is redrawed not as setted but in other way);

Grid version 8.3.2.6



Thank's for your patience.



Daniele



PS: There's a strange time out session error on forum form(s) that is fired up when the "send message" button is pressed

Under these specific conditions we could see an issue and we're investigating.

Thank's Bruno