Desired behavior of "Datagrid with Form" Template?

Hello Radzen Team,
i have several pages generated with "Datagrid with Form" Template.
Yesterday i saw that these pages are acting unusual or unexpectedly...

please have a look @ the video

Is this the correct behaviour or is something going wrong in my application?
The page "Einheit Test" in the video is freshly generated without any code change from my side.

i can change data in the einheit test page without any validation and without submitting. When i call savechanges() in another part of the application these changes are writen to the database.

Seems to have something to do with the dbcontext.
Is this the "normal" behaviour of a radzen generated app?

Hope you can help

Thomas

Yes, this is how the DbContext works. It will track all changes and later save them on the first SaveChanged() call.

hello @enchev ,
do you any hints how i can prevent the application to act like this?
If it works like this users can save data to the database that are not validated in the form where they are created. That is a fundamental problem.

Kind Regards
Thomas

Can i call DbService.Reset() on start of every Page to get rid of the context changes on another page?

Reset():
public void Reset() => Context.ChangeTracker.Entries().Where(e => e.Entity != null).ToList().ForEach(e => e.State = EntityState.Detached);

Does it reset the whole context so that i lose all changes and have the actual context from database on start of every page?

Kind regards
Thomas

This indeed will reset the whole DbContext.

Hello @enchev,
can you help me where to call dbcontext.Reset()?
In OnInitalizedAsync()?
Or is this to late or too early?

Thanks for help!
Thomas

There is an option to stop EF tracking during data source infer

Please note that CRUD pages are dependent to this option and you might need to regenerate them if you turn it off.

Thank you @enchev,
i will test it

Thomas