Hi,I am using FNC Grid on one of our applications and I noticed a difference on behavior of cell validate between FNCGrid vs AdvStringgrid.

On Cell Validate, if the entered value is invalid, the Advstringgrid will return to edit mode, while FNCGrid just selects and focuses the cell. I wanted to achieve the same behavior of advstringgrid using FNCGrid. Below is the sample code for reference. I am using Delphi Tokyo, TTMSFNCGrid and TAdvStringGid (Free trial only)

procedure TForm4.AdvStringGrid1CellValidate(Sender: TObject; ACol,
ARow: Integer; var Value: string; var Valid: Boolean);
valid := False;

procedure TForm4.TMSFNCGrid1CellEditValidateData(Sender: TObject; ACol,
ARow: Integer; CellEditor: TWinControl; var CellString: string;
var Allow: Boolean);
Allow := False;

We are currently investigating this issue.

We have improved this, next version will have this improvement included.

1 Like

Hello again, I also noticed a difference between fncgrid vs advstringgrid. on cell edit the advstringgrid highlights the text so the user is ready to enter the new value; wherein fnc grid, the cursor is in the left and the user still needs to manually highlight the text to erase the original value of cell before it can enter the new value. Is there a way I can copy the behavior of advstringgrid using fnc grid? Thank you.



In FNC this should also happen. We have tested here in VCL and the text is selected when pressing F2 or ENTER to edit the cell. Are you using the latest version.

Works after updating. Thanks a lot!

1 Like

Hello, thank you for the last improvement on the cell edit validate when invalid data is entered.
However,i cannot leave the inplace editor until the allow boolean is set to true. On Advstringgrid,the user can click away and the cellstring(invalid data) will revert to original cellstring.


We have applied an improvement for this additional behaviour, the next version will address this.

Hello, below is the link of a video of the behavior of advstringgrid that we are trying to do in FNC Grid. The application in the video is made with Delphi 4, and the grid used is advstringgrid. On cell edit validate data event ,when data is invalid, we prompt the User a dialog box, and we just set the code to valid := false then advstringgrid reverts the value to the original cellstring.

Advstringgrid Sample Video

I have downloaded the latest fnc updates, but on cell edit validate event ,when data is invalid, the dialog box keeps on popping up (since we prompt the user a dialog box when data is invalid). It seems like the on cell edit validate data is always triggered.

Thank you so much