This is a migrated thread and some comments may be shown as answers.
Pager customisation
1 Answer 20 Views
This is a migrated thread and some comments may be shown as answers.
Mathew
Top achievements
Rank 1
Mathew asked on 06 Sep 2013, 12:12 PM
Hi,

I have a RadGrid that I'm using to do some custom paging.  This works really well and I'm very happy with how it works.  Because the page size of the items I'm displaying changes depending on the selection, I'm changing the VirtualItemCount property to make sure that the number of pages stays consistent, regardless of how many items are displayed.  This works well, but it displays on the bottom of the grid (items x to y of total) which obviously changes as the VirtualItemCount changes.

What's the best way to customise just this part of the pager?  I've seen in the online demos how to customise the whole thing, but I really just want to access the control that says that and change the text.

I'm using the ItemCreated method as follows:

protected void Grid_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    ...
}

But I don't seem to be able to access the label/literal itself in order to change the text.

Thanks

1 Answer, 1 is accepted

Sort by
0
User
Top achievements
Rank 2
answered on 07 Sep 2013, 04:37 PM
Hi,

I suppose you are trying to customize your PagerText. If thats the case, then you can try the following format:
 
RadGrid1.MasterTableView.PagerStyle.PagerTextFormat = "The Page:{4} My Page {0} of {1}";

Take a look into the following doc.
Using PagerTextFormat

Thanks.
Tags
Grid
Asked by
Mathew
Top achievements
Rank 1
Answers by
User
Top achievements
Rank 2
Share this question
or