Solved

Gridview Paging and Footer

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

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…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 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