Hi All,
I'm working on a scenario where I'm showing a pagination in a listing page and there is a delete action for every item.
When I delete the last item of any page the pagination will not work properly and will not load the pagination number and the content in a proper manner.
It will happen only when I delete the last record of every page.
Please suggest me any idea for this. Find the image for the reference.
Thanks
Prince Kumar
Adding successful snippet of code in case anyone needs to implement similar functionality. Had to make one minor edit due to the aggregate refresh. Please refer to comments in the screenshot.
Hi Buddy,
You have to do some manual assign and condition on delete.Use below If condition after deleteStartIndex<(GetDataById.Count/10)*10
and after that assign below on falseStartIndex-MaxRecords
This is working fine for me
Please mark solution if works
Thanks @Yogesh Javir, for your reply. It works for me :)
Prince
Hello Prince,
At the end of your delete action are you using the RefreshData from the listing?
Regards,
Jorge Rodrigues
Thanks for the reply, Jorge
Yes, I'm refreshing the data from listing. Can see the image below
Can you send the OML file for me to analyze?
Sorry Can't send the OML. Jorge
Hi,
Please take a look at this sample, and .oml attached.
Cheers,
Khuong
Thanks for the reply Khuong,
But this functionality already done in the application on page navigate.
This will work while navigating the page only when we click on the pagination.
But my issue is like if I'm deleting the record one by one until unless there will be one record left in the list in a page. (for ex. Page No.3 - only 1 record remain) and If I delete the last record as well the pagination data got change and It will not return the Page-2 and the list also not show any item as I'm showing in the image above.