This is a migrated thread and some comments may be shown as answers.
How to hide the "First" and "Last" RadGrid's buttons
6 Answers 92 Views
This is a migrated thread and some comments may be shown as answers.
javier
Top achievements
Rank 1
javier asked on 31 Aug 2012, 01:40 PM
Hi,

I'm using a RadGrid and wit the NextPrev PagerStyle-Moded, anyway the grid displays the Next, Previous First and Last.
I need to hid ethe First and Last

Thank you,

6 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 01 Sep 2012, 08:58 AM
Hello,

Please try with below code snippet.

<style type="text/css">
       .RadGrid .rgPageLast,.RadGrid .rgPageFirst
       {
           display:none !important;
       }
   </style>



Thanks,
Jayesh Goyani
0
javier
Top achievements
Rank 1
answered on 03 Sep 2012, 11:13 AM
Thank you Jayesh, it worked.
0
Tofan
Top achievements
Rank 1
answered on 08 Nov 2013, 02:31 PM
Where to insert to css snipet to work? Please I would like to know.

PT. Nevermind. Found the answer.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 08 Nov 2013, 04:46 PM
Hello,

If you want to hide this only in one page then you have to set this style into your aspx page.

if you want to hide this from whole application then create one CSS file and place this style in it and give this css file link in to your page.

Let me know if any concern.

Thanks,
Jayesh Goyani
0
Arun
Top achievements
Rank 1
answered on 12 Feb 2016, 12:51 PM
This Css Is Working Fine suppose if i want to Hide  Those Buttons Only when the Radgrid Bindlist Count is <50 so how can i do it can i do it in Prerender Event ?
0
Eyup
Telerik team
answered on 17 Feb 2016, 12:55 PM
Hi Arun,

You can use the following approach to access the row count:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        GridPagerItem pager = (GridPagerItem)e.Item;
        if (pager.Paging.DataSourceCount > 50)
        {
            pager.OwnerTableView.PagerStyle.Mode = GridPagerMode.NumericPages;
        }
    }
}

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
javier
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
javier
Top achievements
Rank 1
Tofan
Top achievements
Rank 1
Arun
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or