I use Radzen datagrid control with paging and I find two issues:
1 issue is when we are on first page and click on previous page always make a request although the buttons look like disabled.
2 issue is when I am adding a new row to my repo and call the function GoToPage(lastPage) to see the new row in the end of the grid.
//here is the code how I calculate my last page
var recordCount = drawScheduleCount + 1;
var lastPage = (int)Math.Ceiling((double)recordCount / (double)Constants.Grid_Page_Size);
rg.GoToPage(lastPage - 1);
Your function lastPage() doesn't work correctly as well when we have only one row to show on this last page.
The grid loads the correct data but marks (wrong) the previous page number only when there is one row on the last page. If we have more then one row on last page everything is Ok.