New DataGrid data refresh from database

Hi,

I have a SQL Server back-end and a Radzen Blazor page generated using the "CRUD pages" wizard for editing a table's contents. The page hasn't been altered so, the grid (which is the new version) is populated from an invoke on the Page Load handler as generated by the wizard.

Everything works fine if adding / editting / deleting records from this page but, if a record is changed using (for example) management studio - such as adding "123" onto the end of a string field's value, the page doesn't pick up and display the change. Closing and re-opening the page also doesn't seem to update the display of the data to reflect the changes in the database. Oddly, the filters do seem to pick up the change so, if I put 123 into the filter area, the correct record is displayed in the grid but, with the incorrect (old) value shown (i.e. without the "123")

I'd like to add a "Refresh" button to the page to get the grid to refresh it's contents from the database but, I don't seem to be able to find a way of doing this despite trying various bits of code found on this forum. Is there a recommended bit of code which is guaranteed to work?

Thanks!

Hi @markb,

I'm unable to reproduce such issue:

Hi @enchev,

Thanks for the reply and I get the same if I use the browser refresh button but, using your video as an example, if you change the username value and change pages on the Radzen application and then go back to your "Order" page without using the browser refresh button, does the grid show the modified value or the original value? I see the original value.

What you see is the EF cache - the server is hit on paging:

If you modify the service method to disable caching you will get fresh data: