1 page for add & edit

Thank you for sharing your idea. Also there is a solution to achieve this by editing the .cs files (see Why separate Add/Edit? - Radzen.Blazor Components - Radzen) I found a way to do it within the editor (only affecting the json files).

@korchev thank you for any comments to this approach: do you see any caveats?

  1. Modifying the created "Add" button to call the edit page instead of the add page and pass Id = null
  2. Modifying the load() event in the edit page: creating a new object (yes, the entity is a project, we are dealing here, from a table called projects).
  3. Modifying the existing getProjectById event and only do it when the passed parameter was not null:
  4. Modifying the save button on the edit page: add a click event to create the project on the database if the parameter ID was null:

Thank you for letting me know, if this contains unnecessary or faulty steps, your input is much appreciated.

1 Like