Jump to content

Show "record 1 Of 1" In The Details Page When There Is Only One Record In The Results Page


Recommended Posts

When there are multiple records in the results page, there will be a navigation with message "Record 1 of X" in the details page. But if there is only one record in the results page, there will be no navigation. I wonder to know how to show the message "Record 1 of 1" in the details page. 

Link to comment
Share on other sites

Hi, I could not find a standard setting for this. You can add id around paging message "Record %r of %t", add another message "Record 1 of 1" with a different id in the details page, use JS code to hide the "Record 1 of 1" message when default paging message displays, show the  "Record 1 of 1" message when there is no default paging message. 
 
1. Add id around paging message in the Localization  <span id="paging">Record %r of %t</span> 
paging.png
 
2. Add another message "Record 1 of 1" with a different id in the details page. Hide the message as a default. For example:
<div align="center" id ="pageNumber1" style="display:none;" class="cbFormNavigationCell cbFormNavigationMessage">
<span>Record 1 of 1 </span>
</div>

3. JS code to display the previous message when id= "paging" id is not found. 

<script>
if (!document.getElementById("paging")) {
document.getElementById("pageNumber1").style.display = 'inline';
}
</script>

code.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...