Hi,
I have problem with scrollig up DataGrid during adding new record. For example when I am on the bottom in DataGrid and click "Add" button the new editeble row showing up on the top of the DataGrid. To go into this record I need to scroll up DataGrid on my own. Is it possible to "refresh" DataGrid without fetching data again?
Here is my code:
private async Task InsertRow()
{
// commented code solved the problem, but it's really bad idea to do it in this way ;)
//_sampleObjects = new List<SampleObject>();
//await FetchData();
//await InvokeAsync(StateHasChanged);
try
{
await _grid.InsertRow(new SampleObject());
_sampleObjects.Append(new SampleObject());
_sampleObjectsCount++;
await InvokeAsync(StateHasChanged);
}
catch (Exception ex)
{
Error.ProcessError(ex, "Error during inserting");
}
}