Sunday 12 January 2014

How to show the Pager in Telerik Grid both in top and bottom.

While working in a project , my client wants to show the paging in the grid in both in the top of the grid as well as in the bottom of the grid also. As I am using the Telerik grid, it has a property to set while creating the grid. 

So here is the code for it:


.Pageable(p =>
      {
         p.Style(GridPagerStyles.NextPreviousAndNumeric | GridPagerStyles.PageSizeDropDown);    
         p.Position(GridPagerPosition.Both); // this line will do the Magic
         p.PageSize(int.Parse(ViewBag.PageSize ?? "50"), new[] { 10, 20, 50 });
       }).Sortable()
Happy Coding!

No comments:

Post a Comment