Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
I am using a gridview where i am binding a data column.. this is the aspx code of grid..

VB
<asp:GridView ID="GridViewJobList" runat="server" AutoGenerateColumns="false" CssClass="gridTable"
                            EmptyDataText="No Record Found" DataKeyNames="Entry_No" OnRowDataBound="GridViewJobList_RowDataBound"
                            Width="100%" GridLines="None" AllowPaging="True" PageSize="8">



I have 11 records .. According to the code, maximum of 8 records are displayed and pager appears but when i click on 2 to see next records starting from 9th row, click shows no effect and first 8 records are displayed... Is it that i am missing to add some properties???
any help??
Posted

you should handle gridview_pageindexchanging event

C#
protected void yourgrid_pageindexchanging(object sender,GridViewPageEventArgs e)
{
   yourgrid.PageIndex = e.NewPageIndex;    
    bindgrid();
}
 
Share this answer
 
v3
Comments
Karthik_Mahalingam 7-Jan-14 4:03am    
5, Good
On top of Tun Aung Paing solution1 ( works perfect )
have a look on similar post you find multiple solutions and suggestions

paging in gridview in asp.net[^]
 
Share this answer
 
Comments
Codes DeCodes 7-Jan-14 4:12am    
thanks for the link man...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900