Data Grid Button Display

Project1.zip (78.8 KB)

I am having serious issues with FNCDataGrid display after yesterdays update. The starting problem is with the display of Button Controls which jump out of their cell when hovered over and clicked in quick succession. I have attached a minimal program which exhibits the behaviour.

Also there is some other timing issue happening. If I uncomment the BeginUpdate and EndUpdate then click on a Button, it creates an access violation.

Can you specify the version number of TMS FNC UI Pack installed and the version number of TTMSFNCDataGrid?

Can you move TMSFNCDataGrid1.HideRow(ARow); to the end of the routine, including BeginUpdate/EndUpdate?

We meanwhile applied a fix for the access violation.

Datagrid version = 1.3.0.1
FNC UI Pack Version = 6.4.0.3

This is a rather contrived example of what my main program does but essentially clicking on the button hides the row and can effectively hide a bunch of other rows as a result, so I'm not quite sure where you would need me to move code to? Or indeed what it is we are trying to avoid by adjusting the code?

So we already applied improvements and fixes, but as a workaround, please use this code

procedure TForm1.DoSomething(const ARow : Integer);
var
  I: Integer;
  lRowCount : Integer;
begin
  lRowCount := 100;
  TMSFNCDataGrid1.BeginUpdate;
  TMSFNCDataGrid1.ColumnCount := 4;
  TMSFNCDataGrid1.RowCount := 0;
  TMSFNCDataGrid1.RowCount := lRowCount;
  for I := 0 to lRowCount - 1 do
  begin
    if I mod 5 = 0 then
    begin
      TMSFNCDataGrid1.HideRow(I);
    end;
    TMSFNCDataGrid1.Cells[0, I] := I.ToString;
    TMSFNCDataGrid1.SetButton(2,I, 'Click Me');
  end;
  TMSFNCDataGrid1.AutoSizeColumns(gamAllCells);
  TMSFNCDataGrid1.HideRow(ARow);
  TMSFNCDataGrid1.EndUpdate;
end

However, we are not able to reproduce the shifting of the control outside its cell, which RAD Studio are you using?

Hi Pieter, I'm on 12.2 (with patch 1 I think). Please refer to GIF of issue in action. All I'm doing is rolling my cursor over the buttons which can cause some artifacts, but the big jumps happen when I click. Note that replication is not consistent, but after clicking 4 or 5 times I'm usually guaranteed that it happens at least once.

2025-02-28_18-44-19

Also thanks for the workaround but it doesn't work for my main program which is far more complicated. Hopefully once the update is published it will fix my issues to a point that the program is functional again.

Thanks for the additional info, I'll investigate.

One more question, are you working on a scale > 100%?

Yes, 125%. The eyes aren't what they used to be.

Thanks, it's only reproducible when scale > 100%. I'll investigate.

We applied a fix for the control hovering / size and the invalid pointer. Next version will have this fixed. (Next week)

1 Like