Default Values Server Side


I am trying radzen with angular.
I would like to use the odata v4 service as backend for my exisiting winforms application.

Is it possible to have default values for fields of a class on server side.
For example I have the table tasks in my database with a field status.
The status field should have the default value "new".


OnXXXCreated partial method can help you:

Thanks for this.
I already saw the partial methods.
But the data is created if I save it to the database.
For example if I click on add data on my form the data is empty. If I save it, it will fill the fields.

But I would like to have the data filled if I click on the add button. Is this possible? But not on the client for every client code?

To have new values populated in Form inputs you need to add them on every add page form using Angular/JavaScript. There is no way to populate add form inputs default values from the server.

ok. thanks.
My last app I created in Lightswitch and there was an easy way to do it.

There was a method xxx_created() fired on client side and a method xxx_inserted() on server side.

I also tried to write an initial value in the constructor, but it does not work...