Adding stringgrid row causes onValidate event to fail
Original Reporter info from Mantis: igoddard
-
Reporter name: Ian Goddard
Original Reporter info from Mantis: igoddard
- Reporter name: Ian Goddard
Description:
I have a TStringGrid. I'm using OnValidate to check & reformat some cells.
I also use onSelectCell to check if the last row has been selected and if it has the rowcount is incremented to add another row so that the user always has another row available. When the row is added the OnValidate handler is not called.
The same thing happens if the handler is modified to add another line when the next to row is entered so it's not a side effect of the focus being shifted to the last row.
Additional information:
Code of the onSelectCell handler:
var
StringGrid : TStringGrid;
begin
StringGrid := TStringGrid(Sender);
if aRow = StringGrid.RowCount - 1 then
StringGrid.RowCount := StringGrid.RowCount + 1;
end;
Mantis conversion info:
- Mantis ID: 23652
- Version: 1.0.4
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 39868 (#459cdc0c)
- Target version: 1.2.0
- LazTarget: 1.2