Link to home
Start Free TrialLog in
Avatar of panasonic2012
panasonic2012

asked on

Gridview Paging and Footer

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
Avatar of Kamal Khaleefa
Kamal Khaleefa
Flag of Kuwait image

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>
Avatar of panasonic2012
panasonic2012

ASKER

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 ????
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
ASKER CERTIFIED SOLUTION
Avatar of panasonic2012
panasonic2012

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
plz ask me more if anyone needs it