Submitted on customer behalf:
This line of code is taken directly out of your https://demos.telerik.com/blazor-ui/grid/editing-inline
What kind of magic updates the actual database?
privatevoidUpdateItem(GridCommandEventArgs args)
{
var argsItem = args.ItemasProductBindingModel;
var index =GridData.FindIndex(i => i.ProductId== argsItem.ProductId);
if(index !=-1)
{
GridData[index]= argsItem;
}
}"
Hello Lyle,
This demo does not update the database, you can easily check that by editing a row, then reloading the page - it will have the initial values.
To update a database, you should call your data service to do so in an actual app. In this demo, we don't update it because it would pollute the database very quickly and subsequent visitors may have issues. We only update the view-model in the demo.
You can read more about how editing in the grid works here: https://docs.telerik.com/blazor-ui/components/grid/editing/overview
For example, this demo calls a service to update the database: https://demos.telerik.com/blazor-ui/grid/overview
Regards,
Marin Bratanov
Progress Telerik