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

Pagesize in the RadGrid Header

4 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 11 Dec 2012, 09:10 PM
I'd like to put the pagesize dropdown into the header (top right) of my radgrid but leave the rest of the paging controls in the footer... is this possible?

4 Answers, 1 is accepted

Sort by
0
Sean
Top achievements
Rank 1
answered on 11 Dec 2012, 09:20 PM
Sorry ... additionally I want to display the 'Displaying page 1 or 10' in the header as well.
0
Shinu
Top achievements
Rank 2
answered on 12 Dec 2012, 03:58 AM
Hi,

Try setting Position property as shown below.
aspx:
<PagerStyle Mode="NextPrevAndNumeric" Position="Top"/>

Thanks,
Shinu.
0
Sean
Top achievements
Rank 1
answered on 12 Dec 2012, 03:15 PM
nah that doesn't really work I want the navigation and page #'s at the bottom - only the page count/size dropdown at the top
0
Eyup
Telerik team
answered on 17 Dec 2012, 09:01 AM
Hello Sean,

Please try the following approach:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        GridPagerItem pagerItem = e.Item as GridPagerItem;
        if (pagerItem.IsTopPager)
        {
            pagerItem.CssClass = "topPagerClass";
        }
        else
        {
            pagerItem.FindControl("PageSizeComboBox").Parent.Visible = false;
        }
    }
}
CSS:
<style type="text/css">
    .topPagerClass .rgArrPart1,
    .topPagerClass .rgNumPart,
    .topPagerClass .rgArrPart2,
    .topPagerClass .rgInfoPart
    {
        display: none;
    }
</style>

I hope this will prove helpful. Please give it a try and let me know about the result.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Sean
Top achievements
Rank 1
Answers by
Sean
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Eyup
Telerik team
Share this question
or