Datagrid with form - delete last row

Hello,

if I delete the last row in a Datagrid with form the last values are still in the form:

how to remove that values or form?
if I press save also an error occurred

robert

You can set Visible property of the form to expression that checks if there are items in the collection bound to the DataGrid Data.

there is logic inside the visible proprety like

${test != null && canEdit}

but in that case test is not null - this is the code from the template...

robert

Yes, you can append to that expression one more condition.

I have done it with getTestResult.Count() > 0

${test!= null && getTestResult.Count() > 0}

maybe you make it also availble in the Templates

robert

Yes, we will update our template.