Update Only One Row in SFGrid -> Blazor

Version: Syncfusion Blazor Server 19.1.0.63

Hi, I'd like to know how can I refresh only one row without refresh the whole grid. I dont want to use Query. 
I need to use this because my grid has to keep with the current view. 

My grid has a primary control and some information in it's details. 

When I sent : "GridComum.Refresh();", the whole grid and details close. 



1 Reply 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team June 3, 2021 12:43 PM UTC

Hi Rodrigo, 

Greetings from Syncfusion support. 

Query : Update Only One Row in SFGrid 
Based on this requirement, we suggest you to use SetRowData method of grid. With this method you can update and refresh a particular row in grid. We have prepared a sample based on this requirement, please download the sample from the link below, 

Please refer the codes below, 

 
<SfButton OnClick="OnClick">Update a row</SfButton> <SfGrid @ref="Grid" DataSource="@Orders" ...>    <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Normal"></GridEditSettings>    ...</SfGrid>
 
SfGrid<Order> Grid; 
public async Task OnClick() 
{ 
    await Grid.SetRowData(1001, new Order() {OrderID=1001, CustomerID="Updated", Freight= 2,OrderDate=DateTime.Now,ShipCountry="France" }); 
} 


Please get back to us if you need further assistance. 

Regards, 
Renjith R 


Marked as answer
Loader.
Up arrow icon