Customize grid paging total items count

Hello, I need to customize the appearance of the total items count in grid paging. 

How can I apply different number formats for total items count in grid paging, so instead of 4890 it will be shown as 4,890 for example?

Can I do this without setting the template for the whole paging component?


3 Replies

RS Renjith Singh Rajendran Syncfusion Team August 19, 2021 10:58 AM UTC

Hi Oleksandr, 

Greetings from Syncfusion support. 

Based on this scenario, it is suggested to use Pager Template feature of Grid. Please refer the below demo and customize your pager based on your requirement. 

You can fetch the total records count from the context value as like below code, and customize the pager to display based on your requirement. 

 
   <GridPageSettings PageSize="10"> 
        <Template> 
          @{ 
               var check = (context as PagerTemplateContext); 
               var totalRowCount = check.TotalRecordsCount; 
          } 
          ... 
       </Template> 
   </GridPageSettings> 


Please get back to us if you need further assistance. 

Regards, 
Renjith R 



FR Francisco August 9, 2024 03:28 AM UTC

How i can do this with asp.net mvc and EJS()



SI Santhosh Iruthayaraj Syncfusion Team August 12, 2024 01:44 PM UTC

Hi Francisco,


You can find a detailed explanation on how to use the Template property of the PageSettings, along with a code sample, in the following documentation:


Documentation: Pager Template in ASP.NET MVC Grid Component (syncfusion.com)


Regards,

Santhosh I


Loader.
Up arrow icon