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

remove page # if no records

1 Answer 175 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rayne
Top achievements
Rank 1
Rayne asked on 10 Aug 2012, 06:55 PM
I'm using a kendo grid with paging.

When there are no records it shows a zero for the page #, and the empty message appears. How can I not show the zero page #?

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 15 Aug 2012, 04:14 PM
Hi Rayne,

You will need to use the dataBound to check if the items in the Grid are 0 then hide the number in the footer.
e.g.
function onGridDataBound(e){
     if(this.dataSource.view().length==0){
          $('.k-pager-info').hide(); 
     }else{
            $('.k-pager-info').show();  
       }
}


All the best,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Rayne
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or