TTMSFNCGrid: Wrog selection (smSingleRow)

Hello,

row-selection in the following exsample does not always work correctly. Please run the following code and click on any row. The first row stays selected. The clicked cell gets only the focus-rectangle.
This only happens if not all columns are displayed.

You can make it work if you make the follwing change in VCL.TMSFNCCustomGrid:
function TTMSFNCCustomGrid.GetDisplayCell
  begin
-    maxr := Length(FCellArray[Result.Col]) - 1;
+    maxr := VisibleRowCount - 1;
    if ACell.Row > RowCount - 1 - FixedRightColumns then

The following exsample needs a TForm with a TTMSFNCGrid and a Button to work.

unit URowSelectTest;

<...>

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  TMSFNCGrid1.RowCount := 50;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  TMSFNCGrid1.Options.Selection.Mode := smSingleRow;
  TMSFNCGrid1.RowCount := 1;
  TMSFNCGrid1.ColumnCount := 10;
  TMSFNCGrid1.FixedColumns := 0;
end;

end.

Greetings
Andreas Maier

Hi, 


We have tested this here but are not able to reproduce this issue. Are you using the latest version and could you send us a complete sample that is able to reproduce this issue with step-by-step instructions?

Hi,

I' m using the latest TMS FNC UI-Pack version (1.7.0.2; Grid-Version: 1.0.4.0)

After starting my sample (see my last post) i clicked
1) on the Button and
2) then the grid-cell (col = 0, row = 5).
The result is:


I can send you the complete sample. Unfortunately i can't attach it here. Please tell me how to proceed.

Hi, 


Please send us the sample via the support form, available at:
http://www.tmssoftware.com/site/support_mail.asp