Strange behaviour of DatePicker in DataGrid inline edit mode

Hi
I'm trying to setup a datagrid with inline editing. I used the methods shown in datagrid-inline-edit
It's working fine for the most of the fields. Only with the DateTime fields I experience a strange behaviour.
For the DateTime fields I use a RadzenDatePicker inside the EditTemplate;

@page "/EditRecordingRequest/{RequestId}"
@using ....Core.Models;
@inherits PageBase
<div width="90%">
    <RadzenDataGrid Data="@Model.ScheduledTimeSlots"
                    TItem="ScheduledTimeSlot"
                    @ref="timeSlotsGrid"
                    RowUpdate="UpdateTimeSlot"
                    EditMode="DataGridEditMode.Single">
        <Columns>
            <RadzenDataGridColumn TItem="ScheduledTimeSlot" Property="@(nameof(ScheduledTimeSlot.End))" Title="End">
                <Template Context="scheduledTimeSlot">
                    <div>
                        @scheduledTimeSlot.End
                    </div>
                </Template>
                <EditTemplate Context="scheduledTimeSlot">
                    <RadzenDatePicker @bind-Value=@scheduledTimeSlot.End
                                      TValue="DateTime"
                                      ShowTime="true"
                                      ShowSeconds="false"
                                      HoursStep="1"
                                      MinutesStep="1"
                                      DateFormat="dd/MM/yyyy HH:mm" />
                </EditTemplate>
            </RadzenDataGridColumn>
            <RadzenDataGridColumn TItem="ScheduledTimeSlot" Title="Edit" Sortable="false">
                <Template Context="scheduledTimeSlot">
                    <RadzenButton ButtonStyle="ButtonStyle.Info"
                                  Text="Edit"
                                  Size="ButtonSize.Small"
                                  Click="@(args => EditTimeSlot(scheduledTimeSlot))"
                                  @onclick:stopPropagation="true" />
                </Template>
                <EditTemplate Context="scheduledTimeSlot">
                    <RadzenButton ButtonStyle="ButtonStyle.Primary"
                                  Text="Save"
                                  Size="ButtonSize.Small"
                                  Click="@(args => SaveEditedTimeSlot(scheduledTimeSlot))" />
                    <RadzenButton ButtonStyle="ButtonStyle.Secondary"
                                  Text="Cancel"
                                  Size="ButtonSize.Small"
                                  Click="@(args => CancelEditTimeSlot(scheduledTimeSlot))" />
                </EditTemplate>
            </RadzenDataGridColumn>
        </Columns>
    </RadzenDataGrid>
</div>

I believe this is pretty similar to the method used in the sample. (for readability I left out some parts)

But when I pick a different date/time in the RadzenDatePicker, the DataGridRow immediately returns to the viewing state, instead of staying in the editing state.

I cannot understand this behaviour. Because for all other fields (which are not included above) everything seems to work fine.

Any clues?
Thanx in advance.
Henk

Your code looks correct and our demo shows a datepicker being used during inline editing without issues. You can check for any exceptions or JavaScript errors.

It gets even more weird.
When I choose a date that I have chosen before, the row stays in Edit mode. When I choose another date the row immediately returns to the View state.
Can it be that it has something to do with ChangeTracking? Or a threading thing maybe?

What events are triggered when the DatePicker closes?

This could happen if changing the datepicker value somehow triggers StateHasChanged of the page. Or something calls the Reload method of RadzenDataGrid.

I found a way to solve it.
Added the next property to the DatePicker:

Change="@(args => DatePickerChanged(scheduledTimeSlot))"

And this code to the codebehind:

        private async Task DatePickerChanged(ScheduledTimeSlot slot)
        {
            await timeSlotsGrid.EditRow(slot);
        }

Not the nicest solution, but it's working.