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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Refresh on v17.2.29-beta

Thread ID:

Created:

Updated:

Platform:

Replies:

145724 Jul 5,2019 08:18 AM UTC Jul 5,2019 10:07 AM UTC Blazor 1
loading
Tags: Grid
Hugo Zhao
Asked On July 5, 2019 08:18 AM UTC

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();
}

Vijayanand S [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon