Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Gridview Paging and Footer

Posted on 2013-01-16
5
Medium Priority
?
1,145 Views
Last Modified: 2013-02-14
i hv a gridview that has paging enabled , and there is footer that is also showing some data in a very last column , is there a way that my paging and the data in the footer be shown in single row together , so paging is shown in left and data is shown on the right
0
Comment
Question by:panasonic2012
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 38782203
try to use custom paging (  <PagerTemplate>)and inside it put your footer

examle

   <PagerTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                            <tr>
<td> here put your next back buttons also ur footer </td>
</tr>
</table>
</PagerTemplate>
0
 

Author Comment

by:panasonic2012
ID: 38785999
i tried a custom paging by adding this in the row created event

if (e.Row.RowType == DataControlRowType.Pager)
            {
                LiteralControl control = new LiteralControl(); //new litearl control
                control.Text = "Showing " + count + " results "; // add text
                Table table = e.Row.Cells[0].Controls[0] as Table;  // get the pager table
                TableCell newCell = new TableCell(); //Create new cell
                newCell.Controls.Add(control);  //Add contol
                table.Rows[0].Cells.Add(newCell); //add cell

            }

Open in new window



it does show the text "Showing X results " but i want it to appear at the very right of the grid , right now it shows next to the paging numbers .. any suggestion ????
0
 
LVL 10

Expert Comment

by:Monica P
ID: 38818509
custom paging with linkbutton

http://www.dotnetcurry.com/ShowArticle.aspx?ID=339

Check whether it meet similar to ur requirement

http://www.dotnetspeaks.com/DisplayArticle.aspx?ID=55
0
 

Accepted Solution

by:
panasonic2012 earned 0 total points
ID: 38872489
i worked on it , by adding another cell to the paging programmatically and binding my desired label there , and then assigning that cell a width of 100% and added class to it with the attribute float=right
0
 

Author Closing Comment

by:panasonic2012
ID: 38888376
plz ask me more if anyone needs it
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question