# Possible Bug in Example of Radzen DataGrid InLine Editing

**URL:** <https://forum.radzen.com/t/possible-bug-in-example-of-radzen-datagrid-inline-editing/11428>\
**Category:** Radzen.Blazor Components\
**Created:** [July 29, 2022, 2:20pm UTC](https://forum.radzen.com/t/possible-bug-in-example-of-radzen-datagrid-inline-editing/11428 "2022-07-29T14:20:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachid](https://forum.radzen.com/user_avatar/forum.radzen.com/rachid/32/11253_2.png) [@rachid](https://forum.radzen.com/u/rachid)\
**Post date:** [July 29, 2022, 2:20pm UTC](https://forum.radzen.com/t/possible-bug-in-example-of-radzen-datagrid-inline-editing/11428/1 "2022-07-29T14:20:33Z")

</div>

Hello,

I'm using the Datagrid with Inline Editing for a simple use case, and based my code on the [example](https://blazor.radzen.com/datagrid-inline-edit) from Radzen. Upon using it I've discovered a bug when adding new rows, and it seems like the example also suffers from it.

Here's how to reproduce it:  
1: Click on 'Add new order'  
2: While in edit-mode, delete one of the previously existing rows.  
3: That row will be deleted, along with the row you were just adding/editing.  
4: 'Add new order' button is still disabled, user is unable to add to the grid

#4 I presume is because the 'orderToInsert' object still contains data, even though the accompanying row is gone.  
I'm not sure if this is intended behaviour, but nonetheless am looking for a workaround and happy to hear suggestions. One option I've tried is to disable the delete buttons when in edit-mode for all rows except the new one, but for some reason I haven't gotten that to work yet.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [July 29, 2022, 3:28pm UTC](https://forum.radzen.com/t/possible-bug-in-example-of-radzen-datagrid-inline-editing/11428/2 "2022-07-29T15:28:44Z")

</div>

Hi @rachid,

You can just set orderToInsert to null in the DeleteRow event handler:

```auto
 orderToInsert = null;

```
