We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grid Refresh on v17.2.29-beta

Coule you please so kind to share a grid demo for me, I change gridData at runtime in onSelect event, but can't make it work.

async void onSelect(Syncfusion.EJ2.Blazor.Lists.SelectEventArgs args)
{
var selectData = JsonConvert.DeserializeObject<Order>(args.Data.ToString());
var selectId = int.Parse(selectData.id);
var orderWithItems = await orderService.getOrderWithItems(selectId);
gridData = orderWithItems.items.ToList();
this.StateHasChanged();
this.detailgrid.DataBind();
this.detailgrid.Refresh();
}

1 Reply

VS Vijayanand S Syncfusion Team July 5, 2019 10:07 AM UTC

Hi Hugo, 
 
You can refer the below sample to filter and refresh the grid data dynamically based on the List item selection. Also, you do not need to call the Grid’s DataBind & Refresh method. Once you update the bound collection data and you have to call this.StateHasChanged() to refresh the UI.  
 
 
Please let me know if you have any questions. 
 
Vijay 


Loader.
Live Chat Icon For mobile
Up arrow icon