There seems to be an issue with the Datagrid when there are 2 pages of records and the page 2 only has 1 record and is deleted.
To replicate the issue, I have created a CRUD using Radzen Studio using the autogenerated pages and then for the Datagrid ticked PagerAlwaysVisible and ShowPagingSummary. There are 11 records to display and I navigate to page 2 and delete the 11th record. Now nothing displays in the Datagrid; not even the 10 records that are left. If I click on page 1 in the navigation, still nothing. The Summary does still say there are 10 items so the items exist but I can't navigate to them.
If there are 21 records and I delete the 21st record on page 3, then I have a problem navigating to page 2 but if I navigate to page 1 and then I can navigate to page 2. Seems like I can't navigate to the immediate previous page and that becomes an issue if only 10 items left as there is only 1 immediate previous page.
This isn't ideal as every time a record is deleted, it goes to Page 1. Based on your code I can modify it so that if the View Count is zero, it goes to the previous page.
However, the page 1 link is displayed in the datagrid and it would be ideal to be able to click on the Page 1 link to go to that page however clicking Page 1 does nothing. The grid still thinks it's on Page 2 and hence the blank page.
Any chance of fixing the datagrid or is it going to be quite involved in which I'll need to add code as above in all my pages