Posted 13 March 2023, 9:06 am EST
Hi,
Apologize for the delay.
JFYI, The support for paging is already there in FlexGrid but there is no DataPager control in Maui yet,
A simple implementation with 2 prev and next buttons would be something like this
_pagedDataCollection = new C1PagedDataCollection<Customer>(Customer.GetCustomerList(100)) { PageSize = 10 };
grid.ItemsSource = _pagedDataCollection;
And then change the page as the Prev and Next buttons are clicked
private void OnPrevClicked(object sender, EventArgs e)
{
if (_pagedDataCollection.CurrentPage > 0)
_pagedDataCollection.MoveToPageAsync(_pagedDataCollection.CurrentPage - 1);
}
private void OnNextClicked(object sender, EventArgs e)
{
if (_pagedDataCollection.CurrentPage < _pagedDataCollection.PagesCount - 1)
_pagedDataCollection.MoveToPageAsync(_pagedDataCollection.CurrentPage + 1);
}
I hope it helps.
Please refer the attached sample for the same: FlexGridMauiPaging.zip
Best Regards,
Nitin