Hello, I have had a requirement to display both top and bottom pager on a DataGrid. For some time I could not figure out why does the LoadData event triggers twice when FirstPage() or other paging methods are called on the DataGrid. It appears that Top and Bottom pagers are both realoaded
and since they are independent they trigger LoadData twice. I was hoping to find a workaround as below:
dataGrid.CurrentPage = 0;
However the CaluclatePager() that updates both of the pagers is called right after LoadData is invoked in Reload(), so it is of no use. Is there a plan to fix this issue or some other workaround I could use?
It will be fixed in our next update this week.
Thank you for the fast response.
I have updated to the latest version and also checked out the commits.
In action, after attempting to use original method, forcing reload to a certain page via datagrid using BOTH top and bottom pager the FirstPage(forceReload: true) method works as intended and only triggers once when loading from a other than 1st page.
However, using original method and calling FirstPage(forceReload: true) from the 1st page breaks in a way that the page is not forcibly reloaded, breaking even the previous behaviour using ONLY top OR bottom pager.
Not sure I understand the problem. Maybe you can use this demo to illustrate your case and what exactly is not working:
Similar to the example I am using the Paging API
async Task FirstPage()
In addition to that I use the LoadData event to call the database.
Force reload is crucial, because I have to reload the grid even when I already am on the first page.
The behaviour in version 3.19.9 is as expected. Forcing reload always invokes LoadData event. In new version 3.19.10
does not invoke LoadData anymore. The changes made in the new version check if the page index or skip arguments are not the same and disregard the force reload parameter.
The first issue I created this thread for was the case when using BOTH top and bottom pager. The problematic code is following:
public async Task FirstPage(bool forceReload = false)
if (topPager != null)
if (bottomPager != null)
There is a missing case describing the behaviour when both are not null. I believe the design of the pagers is good but don't really understand why there are two pagers assigned to a grid instead of one that has binding to top and bottom visual component