Solved

Gridview Paging and Footer

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.net Javascript use multiple sliders 2 31
mail.To.Add 5 28
Deploying to Azure 3 31
How to design the database - Asp.net mvc code first entity framework 1 42
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

831 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