Solved

Gridview Paging and Footer

Posted on 2013-01-16
5
1,014 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now