# RowCreate/RowUpdate not firing with Inline Edit DataGrid

**URL:** <https://forum.radzen.com/t/rowcreate-rowupdate-not-firing-with-inline-edit-datagrid/5944>\
**Category:** Radzen.Blazor Components\
**Created:** [December 7, 2020, 9:36pm UTC](https://forum.radzen.com/t/rowcreate-rowupdate-not-firing-with-inline-edit-datagrid/5944 "2020-12-07T21:36:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rqueen](https://forum.radzen.com/letter_avatar_proxy/v4/letter/r/8dc957/32.png) [@rqueen](https://forum.radzen.com/u/rqueen)\
**Post date:** [December 7, 2020, 9:36pm UTC](https://forum.radzen.com/t/rowcreate-rowupdate-not-firing-with-inline-edit-datagrid/5944/1 "2020-12-07T21:36:33Z")

</div>

I am trying to follow the Inline edit tutorial with making a DataGrid but I can't seem to get the RowCreate/RowUpdate event handlers to fire. I am following this: [Datagrid-Inline-Edit](https://blazor.radzen.com/datagrid-inline-edit)

```
<RadzenGrid Count="@count" Data="@employees" @ref="employeesGrid" AllowSorting="true" AllowFiltering="true" AllowPaging="true" PageSize="20" TItem="Employee" ColumnWidth="overflow: auto;"
             EditMode="DataGridEditMode.Single" RowCreate="@OnCreateRow" RowUpdate="@OnUpdateRow" >
    <Columns>
        <RadzenGridColumn TItem="Employee" Property="EmployeeID" Title="Employee ID">
            <EditTemplate Context="employee">
                <RadzenTextBox @bind-Value="employee.EmployeeID" Style="width:100%; display: block" Name="Employee ID" />
                <RadzenRequiredValidator Text="Employee ID is required" Component="EmployeeID" Popup="true" />
            </EditTemplate>
        </RadzenGridColumn>
        <RadzenGridColumn TItem="Employee" Property="FirstName" Title="First Name">
            <EditTemplate Context="employee">
                <RadzenTextBox @bind-Value="employee.FirstName" Style="width:100%; display: block" Name="First Name" />
                <RadzenRequiredValidator Text="First Name is required" Component="FirstName" Popup="true" />
            </EditTemplate>
        </RadzenGridColumn>
        <RadzenGridColumn TItem="Employee" Property="LastName" Title="Last Name">
            <EditTemplate Context="employee">
                <RadzenTextBox @bind-Value="employee.LastName" Style="width:100%; display: block" Name="Last Name" />
                <RadzenRequiredValidator Text="Last Name is required" Component="LastName" Popup="true" />
            </EditTemplate>
        </RadzenGridColumn>

        <RadzenGridColumn TItem="Employee" Context="employee" Bubble="false" Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="100px">
            <Template Context="employee">
                <RadzenButton Icon="edit" Size="ButtonSize.Small" Click="@(args => EditRow(employee))">
                </RadzenButton>
            </Template>
            <EditTemplate Context="employee">
                <RadzenButton Icon="save" Size="ButtonSize.Small" Click="@((args) => SaveRow(employee))">
                </RadzenButton>
                <RadzenButton Icon="cancel" Size="ButtonSize.Small" ButtonStyle="ButtonStyle.Secondary" Click="@((args) => CancelEdit(employee))">
                </RadzenButton>
            </EditTemplate>
        </RadzenGridColumn>
    </Columns>
</RadzenGrid>

```

And here is my backend code

```
    void EditRow(Employee employee)
    {
        employee = SetStatus(employee);
        employee = ValidateDateTimes(employee);

        employeesGrid.EditRow(employee);
    }
   void OnUpdateRow(Employee employee)
    {
        if (!ValidateUniqueEmployeeID(employee))
        {
            ShowToast(MatToastType.Warning, "Error", "An employee already exists with this Employee ID.");
            return;
        }
        try
        {
            employeeRepo.UpdateEmployee(employee);
        }
        catch (Exception ex)
        {
            ShowToast(MatToastType.Danger, "Error", string.Format("Failed saving employee. {0}", ex.Message.ToString()));
        }

        ShowToast(MatToastType.Success, "Success", "Employee Saved");
    }

    void SaveRow(Employee employee)
    {
        employee = SetStatus(employee);
        employee = ValidateDateTimes(employee);

        employeesGrid.UpdateRow(employee);
    }

    void CancelEdit(Employee employee)
    {
        employeesGrid.CancelEditRow(employee);
    }
    void InsertRow()
    {
        employeesGrid.InsertRow(new Employee(appSettings));
    }

    void OnCreateRow(Employee employee)
    {
        if (!ValidateUniqueEmployeeID(employee))
        {
            ShowToast(MatToastType.Warning, "Error", "An employee already exists with this Employee ID");
            return;
        }
        try
        {
            employeeRepo.InsertEmployee(employee);
        }
        catch (Exception ex)
        {
            ShowToast(MatToastType.Danger, "Error", string.Format("Failed inserting employee. {0}", ex.Message.ToString()));
        }
        ShowToast(MatToastType.Success, "Success", "Employee Saved");
    }

```

I am never able to get the OnCreateRow() or the OnUpdateRow functions to fire. Is there something I am missing?

---

<div class="post-metadata">

**Author:** ![rqueen](https://forum.radzen.com/letter_avatar_proxy/v4/letter/r/8dc957/32.png) [@rqueen](https://forum.radzen.com/u/rqueen)\
**Post date:** [December 8, 2020, 1:50am UTC](https://forum.radzen.com/t/rowcreate-rowupdate-not-firing-with-inline-edit-datagrid/5944/2 "2020-12-08T01:50:47Z")

</div>

I stripped out all of my Validators and tried again and it seems to be working now! Odd that the validators weren't throwing exceptions to the UI but I'll add them back in one at a time to see which one was causing the problem.
