I have list (List<Order>) as the source for a gridview. After updating an element, the grid doesn't show the changes, unless I paginate in which case, I see the expected results. I'm assuming I need to refresh the grid. Any suggestion what the issue could be?
private async Task EditRowInDialog(Order order)
{
var result = await DialogService.OpenAsync<Order>($"Order Id {order.Id}",
new Dictionary<string, object>()
{
{ "Order", order }
},
new DialogOptions() { ShowClose = true });
if (result != null)
{
order = (Order)result.Order;
var index = orders.FindIndex(o => o.Id == order.Id);
if (index == -1)
return;
orders[index] = order;
await ordersGrid.UpdateRow(order);
var state = (Dictionary<string, string>)result.State;
}
}
In the above snippet, orders (List<Order>) is the gridview's (ordersGrid) source.