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

Change Next Arrow to NEXT

1 Answer 105 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
HSLaw
Top achievements
Rank 1
HSLaw asked on 11 Nov 2015, 01:23 PM

Hi,

My Datapager is using:

<telerik:RadDataPagerButtonField FieldType="FirstPrev" />
<telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="5" />
<telerik:RadDataPagerButtonField FieldType="NextLast" />

Instead of arrows, how can I show them as text?
I wish to change from < 1,2,3,4,5 > to PREV 1,2,3,4,5 NEXT

Thanks.


 

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 16 Nov 2015, 11:18 AM
Hello,

By default the buttons in the RadDataPager are using images as background. You can override that and customize the buttons to display text instead.

The following code snippet outlines the approach for changing the prev button. The code is placed in the FieldCreated event handler of the RadDataPager.


protected void RadDataPager1_FieldCreated(object sender, RadDataPagerFieldCreatedEventArgs e)
{
    if (e.Item is RadDataPagerFieldItem)
    {
        RadDataPagerFieldItem item = e.Item as RadDataPagerFieldItem;
 
        Button prevButton = item.FindControl("PrevButton") as Button;
 
 
        if (prevButton != null)
        {
            prevButton.Text = "Prev";
            prevButton.CssClass = "";
        }
         
    }
}


Regards,
Viktor Tachev
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
HSLaw
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or