
Francesco Vivaldi
Top achievements
Rank 1
Francesco Vivaldi
asked on 28 Apr 2011, 02:44 PM
Hi,
I have implemented a pager with custom button.
Works great, but i want to hide the NextPage Button on Last Page of radgrid, or when i select from combobox the max size of the PageSize.
I have implemented a pager with custom button.
<PagerStyle ForeColor="Blue" Mode="NextPrevAndNumeric"
NextPageImageUrl="immagini/u221.png"
Works great, but i want to hide the NextPage Button on Last Page of radgrid, or when i select from combobox the max size of the PageSize.
5 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 29 Apr 2011, 06:06 AM
Hello Francesco,
Here is a sample code to achieve your requirement.
C#:
Thanks,
Princy.
Here is a sample code to achieve your requirement.
C#:
protected
void
RadGrid1_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridPagerItem)
{
GridPagerItem pagerItem = (GridPagerItem)e.Item;
if
(pagerItem.Paging.IsLastPage)
{
pagerItem.Display =
false
;
}
}
}
Thanks,
Princy.
0

Francesco Vivaldi
Top achievements
Rank 1
answered on 29 Apr 2011, 08:46 AM
HI.
works great, but in this way i hide all pager item, i need to hide only the "NextButton".(black arrow in screenshot)
see attachment.
works great, but in this way i hide all pager item, i need to hide only the "NextButton".(black arrow in screenshot)
see attachment.
0
Hello Francesco,
To hide only the "NextButton" in grid pager you can use the CSS class below:
Regards,
Pavlina
the Telerik team
To hide only the "NextButton" in grid pager you can use the CSS class below:
.RadGrid_SkinName .rgPageNext
{
display
:
none
;
}
Regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Bill
Top achievements
Rank 1
answered on 24 Jan 2013, 08:17 PM
It seems that the first answer posted hides all buttons and the second answer posted hides the Next button at all times.
But how can you hide ONLY the Next button when its the last page of the grid?
Thanks
But how can you hide ONLY the Next button when its the last page of the grid?
Thanks
0

Shinu
Top achievements
Rank 2
answered on 25 Jan 2013, 04:58 AM
Hi,
Try the following code to achieve your scenario.
C#:
CSS:
Thanks,
Shinu
Try the following code to achieve your scenario.
C#:
protected
void
RadGrid1_ItemDataBound(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridPagerItem)
{
GridPagerItem pagerItem = (GridPagerItem)e.Item;
if
(pagerItem.Paging.IsFirstPage)
pagerItem.CssClass =
"NextPage"
;
}
}
.RadNextPage .rgPageNext
{
display
:
none
!important
;
}
Thanks,
Shinu