This is a migrated thread and some comments may be shown as answers.

Customize item count message on grid footer when filter is applied

1 Answer 479 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Siva Prasad
Top achievements
Rank 1
Siva Prasad asked on 09 May 2014, 05:44 AM
Hi Team,

We are using Kendo UI grid in our project. One of our project requirement is that, we wanted to customize the item count message appropriately after applying the filter. 

i.e for example,
if total items in a grid is 50 & paging is for 10 records, then the default message on the grid footer would be "1 - 10 of 50 items".
After I apply the filter, assume 7 items are matching, then i need to display a customized message on the grid footer like "1 - 7 of 50 items" but currently it is displaying as "1 - 7 of 7 items".

So, please advice us a possible solution to modify the filter message according with a relevant example.

Thanks,
Siva

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 13 May 2014, 06:40 AM
Hello Siva,

The behaviour which you described is not supported.
The third number from pageable.messages.display message represents total amount of records that can be displayed in the control. If the user sees "1 - 7 of 50 items" he/she will expect to be able to navigate to the last page and read the 50th entry, but eventually that will not be possible because the Grid actually has only 7 records that match the filter criteria.

If you insist you can modify the text manually using jQuery at the dataBound event of the Grid:
dataBound: function() {
  var pageInfo = this.pager.element.find(".k-pager-info");
  setTimeout(function() {
    //modify the pageInfo text
  });
}


Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Siva Prasad
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or