FNCDataGrid w/ webcore - problems deleting row and trying to remove object or control

Hi!

Using Datagrid with webcore I cannot delete a row, except for the last one, from a button event that is in a cell, neither using the native Cell type gcitButton , nor by using a dinamically created button added to a cell by using Controls[c,r].

One way to reproduce, opening the webcore datagrid demo, then make any of the columns a gcitButton. Then add

procedure TForm4.TMSFNCDataGrid1CellButtonClick(Sender: TObject; AColumn, ARow: Integer);
begin
TMSFNCDataGrid1.DeleteRow(ARow);
end;

The grid becomes a random thing after clicking the button.

In my real application, where I have more form elements, objects assigned to cells, etc, I get those
”Cannot use 'in' operator to search for '4' in undefined” errors.
Even if I just try to remove an associated object when I click an “external” button assigned in grid.Controls, with “grd.Objects[0,Lrow] := nil;“ I get those erros.

I can delete the row from the button’s click event when it’s the last row. If there are more rows and I try to delete the first data row, the error rises.
As with the datagrid demo, everything runs ok if i’m trying to delete the last row, but even there, I cannot clean the object associated to the last row (“grd.Objects[0,Lrow] := nil;“).

”grd.Controls[0,LRow] := nil” neither works, and the method RemoveControl is not available in webcore.

We are able to reproduce this and will further investigate this asap.