# 1 page for add & edit

**URL:** <https://forum.radzen.com/t/1-page-for-add-edit/260>\
**Category:** Uncategorized\
**Created:** [March 22, 2018, 10:41am UTC](https://forum.radzen.com/t/1-page-for-add-edit/260 "2018-03-22T10:41:22Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![rene](https://forum.radzen.com/user_avatar/forum.radzen.com/rene/32/8888_2.png) [@rene](https://forum.radzen.com/u/rene)\
**Post date:** [January 11, 2022, 5:09pm UTC](https://forum.radzen.com/t/1-page-for-add-edit/260/5 "2022-01-11T17:09:20Z")

</div>

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](https://forum.radzen.com/t/why-separate-add-edit/7657/4)) 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  
 ![image](https://forum.radzen.com/uploads/default/original/2X/d/dcbb1a5e74d4eec5654b6e7d6f830bade808c9b8.png)
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).  
 ![image](https://forum.radzen.com/uploads/default/original/2X/6/6f3a83956ac9c08fa9579848c4838a983f579596.png)
3. Modifying the existing getProjectById event and only do it when the passed parameter was not null:  
 ![image](https://forum.radzen.com/uploads/default/original/2X/c/c1430e46fee43cc8a42680523e186b653de68c1f.png)
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:  
 ![image](https://forum.radzen.com/uploads/default/original/2X/5/580d0dc5e310376de09ecc3e1d8b58a75e281040.png)

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

---

_[View the full topic](https://forum.radzen.com/t/1-page-for-add-edit/260)._
