Hi,
On a LiveGrid with a BindDatasource, the value of Allow variable (returned by the OnCanInsertRow event) is not considered in the TTMSFMXLiveGrid.DoCanInsertRow procedure. Whatever the value of Allow, it runs this code:
if Assigned(ds) then
begin
Allow := False;
ds.Insert;
end;
Then, whatever the value, it makes a dataset insert, and set Allow to False, so the OnInsertRow event will not be executed.
I think the problems would be corrected with the following code:
if Assigned(ds) and Allow then
begin
Allow := False;
ds.Insert;
if Assigned(OnInsertRow) then
OnInsertRow(Self, ARow);
end;
TIA,
Ricardo