Retain a K2 List View Page Number Using jQuery
K2 doesn’t provide out-of-the-box functionality to retain the list view page number after a list is refreshed. Whenever a user edits and saves a record on any given page, the user will then be navigated back to first page of the list view. We can overcome this frustrating issue by using a combination of jQuery and view rules.
This article will take you through a step-by-step solution on how to retain the list view page number after a list refresh with the help of jQuery.
Registration is required to view the full article. Click here to register for FREE access to Synergy resources…
Start by editing the SmartForm – select the view and give an appropriate name to the list view using the Properties:
Add four data labels to the list view:
Note – It is best practice to use the same name for the data labels as have been used in the scripts. However, if you wish to change the data label names, you will need to ensure that you also update the data label names in the scripts. Each of the data labels should have a unique name, this is to enable you to have multiple list views on the form and to provide functionality to view ‘all lists’.
Please login or register to access the full article.