Can't update a data grid from an associated form

I have a datagrid and a form below (it's based on a view, so I assume I can't update through the view object). I update the data fine through a server call, however I can't the datagrid to reflect the update. Therefore, if I change the row and return to the updated row, the change isn't reflected. However, if I refresh the datagrid the chnages show. I thought the below code would work, (Exexute c#) but it doesn't. Could you please help (code goes through successful route):

var rowId = ${ProductRowId};
SasCms.Models.SasFresh.CmsVwColour curr = ${getCmsVwColoursResult.FirstOrDefault(c => c.col_Id == rowId)};
Console.WriteLine("RowId: " + rowId);
if (curr != null) {
Console.WriteLine("Success: " + ${isBrokenFront});
curr.col_isBrokenFront = ${isBrokenFront};
curr.col_isBrokenAngle = ${isBrokenAngle};
curr.col_isBrokenOpen = ${isBrokenOpen};

}

You can try invoking the Reload method of your datagrid. But first make sure the data it is bound to is latest from the database.

I have almost same problem, ive tried the Reload() but always says grid0.Reload() doenst exist in current context..please help

1 Like

Just for all those who came across this post: i run into this, because I renamed my datagrid in Radzen in a name, starting with uppercase. E.g. AttachmentsDataGrid.
Afterwards in a C# execution block AttachmentsDataGrid.Reload() caused the error CS0103 error:The name 'AttachmentsDataGrid' does not exist in the current context.
But calling attachmentsDataGrid.Reload() worked.