# Add\\Edit in same screen

**URL:** <https://forum.radzen.com/t/add-edit-in-same-screen/5666>\
**Category:** Blazor WebAssembly\
**Created:** [November 18, 2020, 5:53am UTC](https://forum.radzen.com/t/add-edit-in-same-screen/5666 "2020-11-18T05:53:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajit\_Goel](https://forum.radzen.com/user_avatar/forum.radzen.com/ajit_goel/32/4791_2.png) [@Ajit\_Goel](https://forum.radzen.com/u/Ajit_Goel)\
**Post date:** [November 18, 2020, 5:53am UTC](https://forum.radzen.com/t/add-edit-in-same-screen/5666/1 "2020-11-18T05:53:21Z")

</div>

I am using the free community edition but I thought this question might be useful for the general Radzen community.  
Radzen generates two screens for a functionality, one for add and one for edit. Is there a way to specify to use the same screen for both add and edit? Would you have an code example on how I can accomplish this?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 18, 2020, 6:02am UTC](https://forum.radzen.com/t/add-edit-in-same-screen/5666/2 "2020-11-18T06:02:56Z")

</div>

Check the other templates - the DataGrid with Form is what you are looking for.

---

<div class="post-metadata">

**Author:** ![Ajit\_Goel](https://forum.radzen.com/user_avatar/forum.radzen.com/ajit_goel/32/4791_2.png) [@Ajit\_Goel](https://forum.radzen.com/u/Ajit_Goel)\
**Post date:** [November 19, 2020, 5:01am UTC](https://forum.radzen.com/t/add-edit-in-same-screen/5666/3 "2020-11-19T05:01:21Z")

</div>

Hello @enchev, I am assuming that you mean the "[Data bound TemplateForm](https://www.radzen.com/documentation/template-form/#data-bound-templateform)"?

For sample code, I checked the demos in [GitHub - radzenhq/radzen-examples: Sample applications created with Radzen Studio](https://github.com/akorchev/radzen) but I could not find any demos, which added/edited a record in the same screen.

In the application that I am writing, in the application load, I set the property to the result of the "data invoke method". Can I create a new instance of the "data invoke method"'s return type and set it to the property, if the return is a null? Currently, the odata endpoint returns a 404 error, if the record does not exist.  
Similarly, when I am submitting the form, can I conditionally call the save or the create "data invoke method", based on the above property existing or not?

Can you please provide some guidance. Hopefully this is a newbie question.

 ![image](https://forum.radzen.com/uploads/default/original/2X/4/4979b3628b1885ded7e53909840df12306a483c7.png)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 19, 2020, 7:03am UTC](https://forum.radzen.com/t/add-edit-in-same-screen/5666/4 "2020-11-19T07:03:51Z")

</div>

I'm referring to this:

 ![image](https://forum.radzen.com/uploads/default/original/2X/1/1c1dfcbe4a39afb39c942a6e78e49129a2e7fb2d.png)

---

<div class="post-metadata">

**Author:** ![Ajit\_Goel](https://forum.radzen.com/user_avatar/forum.radzen.com/ajit_goel/32/4791_2.png) [@Ajit\_Goel](https://forum.radzen.com/u/Ajit_Goel)\
**Post date:** [November 20, 2020, 9:39pm UTC](https://forum.radzen.com/t/add-edit-in-same-screen/5666/5 "2020-11-20T21:39:37Z")

</div>

Thank you @enchev, I was able to add\edit in the same screen based on the code in the Datagrid with form.
