Issue with RowChanging event and ClearRowSelect

Hi,
Windows 10 x64
TMS Component Pack 8.2.1.0
Delphi 7, XE7, 10 Seattle

With a grid with a RowChangingEvent, if you call ClearRowSelect, the next row you click or assign via code will not trigger the RowChangingEvent.

This used to work in version 8.0.0.1 of the Component Pack and it stopped working in version 8.0.1.0

To reproduce:
Create a new project with a grid (with a RowChangingEvent) and a button that will do a grid.ClearRowSelect.

- Start project
- Click on a new row.
- RowChanging event will trigger
- Now press button to ClearRowSelect
- Click on a row (or assign a new row via code)
- RowChanging event will not trigger.

This used to work so I assume it's a bug?

This change in version 8.0.1.0 seems to have caused the issue:


TMS Component pack v8.0.1.0 : update October 6, 2015

...
Update : TAdvStringGrid v7.8.5.0
--------------------------------
- New : Properties LastRow, LastCol added
- New : TAdvGridColumnPicker component
- Improved : PDF export
- Fixed : Issue with disjunct row selection & changing rowcount


Thanks

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


procedure TForm1.AdvStringGrid1RowChanging(Sender: TObject; OldRow,
  NewRow: Integer; var Allow: Boolean);
begin
 listbox1.Items.Add(inttostr(oldrow)+':'+inttostr(newrow));
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  advstringgrid1.ClearRowSelect;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 advstringgrid1.MouseActions.DisjunctRowSelect := true;
 advstringgrid1.Options :=advstringgrid1.Options + [goRowSelect];
end;

and I cannot see that OnRowChanging stops working.
Do you have more details?

Do not put anything in the form create (comment those 2 lines):

 //advstringgrid1.MouseActions.DisjunctRowSelect := true;
 //advstringgrid1.Options :=advstringgrid1.Options + [goRowSelect];

I tested with your demo and it does indeed work until I remove those lines.
You should be able to see the issue now.

Actually the goRowSelect option doesn't affect the outcome but DisjunctRowSelect does.
If DisjunctRowSelect is False the event does not trigger. If it's True then it works.

Thanks

To avoid confusion, the post author is the same person as I. We renewed our subscription yesterday and I was unable to create a new post with this account so I used our master account to create the post.


We could reproduce it now and have applied a fix that will be included in the next update.