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

Programmatically change settings

1 Answer 75 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Stein
Top achievements
Rank 1
Stein asked on 30 Oct 2015, 03:00 PM
Is it somehow possible to programmatically change for example PageSizeText or the list of PageSizes for the RadDataPager?
 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 03 Nov 2015, 07:44 AM
Hi Stein,

You can use the following approach to achieve this requirement:
protected void RadDataPager1_Init(object sender, EventArgs e)
{
    RadDataPager pager = (RadDataPager)sender;
    RadDataPagerPageSizeField field = pager.Fields.OfType<RadDataPagerPageSizeField>().FirstOrDefault();
    field.PageSizeText = "Success";
    field.PageSizes = new int[] { 10, 25, 60, 100 };
}

Hope this helps. Please give it a try and let me know if it works for you.

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
DataPager
Asked by
Stein
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or