# Datagrid Inline Editing within tabs

**URL:** <https://forum.radzen.com/t/datagrid-inline-editing-within-tabs/5493>\
**Category:** Blazor Server\
**Created:** [November 2, 2020, 10:23pm UTC](https://forum.radzen.com/t/datagrid-inline-editing-within-tabs/5493 "2020-11-02T22:23:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Core4231](https://forum.radzen.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@Core4231](https://forum.radzen.com/u/Core4231)\
**Post date:** [November 2, 2020, 10:23pm UTC](https://forum.radzen.com/t/datagrid-inline-editing-within-tabs/5493/1 "2020-11-02T22:23:48Z")

</div>

I have a grid within a tab that has all rows as editable. If I switch tabs and go back to the grid the rows are no longer in an editable state, and I am also unable to put them in an editable state. Is there something I am doing wrong or is this a bug?

---

<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 3, 2020, 6:57am UTC](https://forum.radzen.com/t/datagrid-inline-editing-within-tabs/5493/2 "2020-11-03T06:57:06Z")

</div>

Not sure how you've put all rows in edit mode initially. Can you clarify?

---

<div class="post-metadata">

**Author:** ![Core4231](https://forum.radzen.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@Core4231](https://forum.radzen.com/u/Core4231)\
**Post date:** [November 3, 2020, 1:40pm UTC](https://forum.radzen.com/t/datagrid-inline-editing-within-tabs/5493/3 "2020-11-03T13:40:08Z")

</div>

I just looped through all the data on a button press and edited the rows.

```
foreach(var data in Grid.Data)
{
    Grid.EditRow(data)
}
```

---

<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 3, 2020, 1:46pm UTC](https://forum.radzen.com/t/datagrid-inline-editing-within-tabs/5493/4 "2020-11-03T13:46:04Z")

</div>

This will not work since when you change tab Data property for the DataGrid will be set again and all state will be lost.

---

<div class="post-metadata">

**Author:** ![Core4231](https://forum.radzen.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@Core4231](https://forum.radzen.com/u/Core4231)\
**Post date:** [November 4, 2020, 6:52pm UTC](https://forum.radzen.com/t/datagrid-inline-editing-within-tabs/5493/5 "2020-11-04T18:52:31Z")

</div>

Thank you, I did no realize tabs contents were destroyed when not being rendered.

I added a Render event on the grid that changes the edit state of the rows based on certain conditions.
