1
Answer

GridView PagerTemplate - How do I add text?

Gary King

Gary King

13y
4.3k
1

Hi,
I have a GridView with Paging enabled so that it displays 1 2 3 4 etc, etc at the bottom (left aligned).
What I want to do is to keep this as it currently is and add a HyperLink which is on the same row and right aligned.
Is this possible? I have tried various solutions which just haven't given me what I want. The nearest I got was with the code below, but this puts the HyperLink on a new row under the page number links....


if (e.Row.RowType == DataControlRowType.Pager)
   {
         
HyperLink hlink = new HyperLink();
         hlink.NavigateUrl =
"AnotherPage.aspx";
         hlink.Text =
"PageTitle";
         e.Row.Cells[0].Controls.Add(hlink);
   }
 
Answers (1)