Update hidden textbox value on SQL Form


I'm new to Radzen and so this may be something very simple that I don't understand.

I have a Grid which loads data from a SQL table.
When I click on a record I get the edit screen.
I can make changes and they are saved back.
All this works fine.

However, I would like to change a value in a textbox (which is not visible to the user) to a specific value that is written back to the DB when the record is saved.

What's the best way to achieve this?

Hi @twalkeracn,

You do not need to have input component (TextBox) to do that. You can simply change the object submitted in Form Submit event with additional property. For example:

Object.assign({}, ${event}, { YourOtherProperty: ${somePageProperty} })

Of course this property should be present in your EF Core model in order to be submitted to the database.

1 Like

Where do I add this code?

I have a column 'ManualEdit' in SQL that is set to 0 by default when an automated process creates the records. I would like this changed to 1 when someone edits the record to show it has been manually modified.

As I said in my previous reply you can use Form Submit event - instead ${event}:

Yes it's working. Thanks.