Click here to Skip to main content
13,249,504 members (57,976 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all, i'm new at web development and have a problem. I have gridview with
pager Next/Previous buttons and they are at the bottom right of the grid(PagerStyle HorizontalAlign="Right"). How do i add a label to the bottom left of the grid but in the same row as the pager?...I have tried this but it adds the label to right of the pager buttons and the label doesnt look like its inside the grid.

protected void DistributionGrid_RowCreated(object sender, GridViewRowEventArgs e)
        if (e.Row.RowType == DataControlRowType.Pager)
        { Label label = new Label();
                label.ID = "lbResult";
                label.Text = "Showing results";
                label.CssClass = "results";
                TableCell td = new TableCell();
Posted 2-Aug-12 1:20am
Updated 2-Aug-12 2:26am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Nice Question (Rated 5 stars)...

I have learnt a lot while working this out...

For this you can use the GridView's PagerTemplate[^] property. (The link here has an example that does close to what you want...).
You just have to write the controls you need inside PagerTemplate tags.

Do also check another example at PagerTemplate not showing in GridView [^].
Ruwaldo 3-Aug-12 8:20am
Thanks for the answer, the first link is what i needed to see.
Tadit Dash 6-Aug-12 4:54am
Great... So you did what you needed. It was a nice question indeed...
Thanks... Happy Coding...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171114.1 | Last Updated 3 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100