How to remove the total displayed on the kendo grid

1 Answer 16 Views
Grid
Max
Top achievements
Rank 1
Max asked on 07 Feb 2022, 01:42 PM | edited on 07 Feb 2022, 01:43 PM

I'm trying to remove the Total on the kendo grid, I would like to display instead of e.g.:

"11 - 15 of 999999 items"

something like:

"11 - 15 items"

I'm using jQuery to achieve that and already put this on the dataBound:


const $pagerInfo = $(".k-pager-info");
if ($pagerInfo.length) {
  const textContent = $pagerInfo[0].textContent;
  const textChanged = textContent ? `${textContent.split("of")[0].trim()} items` : "";
  $pagerInfo[0].textContent = textChanged;
}

this is not currently working.

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Neli
Telerik team
answered on 10 Feb 2022, 09:24 AM

Hi Max,

You could use the pageable.messages.display option and customize the appearance of the messages displayed in the pager. 

  pageable: {
          pageSize: 2,
          messages: {
               display: "{0}-{1} items"
          }
}

Here is a Dojo where this is demonstrated. 

I hope this helps.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Max
Top achievements
Rank 1
commented on 14 Feb 2022, 02:30 PM

Thanks, it worked!
Tags
Grid
Asked by
Max
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or