Upon initializing DataGrid displays all the test data as shown below:
The DataGrid is defined as below:
<RadzenDataGrid
@ref ="@_grid"
AllowFiltering ="true"
AllowRowSelectOnRowClick="true"
FilterMode ="FilterMode.Advanced"
Data ="@Presenter?.Parts"
RowDeselect ="OnRowDeselect"
RowSelect ="OnRowSelect"
SelectionMode ="DataGridSelectionMode.Multiple"
TItem ="Part">
Presenter.Parts is simply a List. Again, after the initialization, the grid is displaying fine.
Then I proceed to delete one of the rows by removing an element from Presenter.Part.
Parts?.RemoveAll(p => parts.Contains(p));
After that, I invoke the Reload() and StateHasChanged().
_grid?.Reload();
InvokeAsync(StateHasChanged);
This is when the grid gets "out-of-sync".
The Parts property has count of 3.
But somehow, _view of the DataGrid only has 2.
What am I missing? As always, thank you!