Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
hi ...
when i click a button , i will show gridview...now i want to set the paging properties ,i had set allow paging   and other properties.. that is working but now the problem is while changing to the next page, grid view is not refreshing and if i click again the button , the gridview is working..
can anyone tell me the solutions?
 
[edit]Subject only: try to give a concise summary of your problem, rather than the whole question in the subject - OriginalGriff[/edit]
Posted 12-Dec-11 21:48pm
Edited 12-Dec-11 21:56pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

add a pageindexchanging event , ex:
  protected void gvCustomers_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {     
            gvCustomers.PageIndex = e.NewPageIndex;
            GridBind();//method to bind the gridview        
       
    }
  Permalink  
v2
Comments
munirajan at 13-Dec-11 3:42am
   
tnx.............
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

call pageindexchanging event on click of page no. or "< >" sign.
set page index to new page index. it will do. try this.
  Permalink  
Comments
munirajan at 13-Dec-11 3:42am
   
tnx
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

HI check this event :
 
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
 
{
 
      GridView1.PageIndex = e.NewPageIndex;
 
}
 

And please add your code in question for better help.
  Permalink  
Comments
munirajan at 13-Dec-11 3:42am
   
tnx
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
 
  GridView1.PageIndex = e.NewPageIndex;
  fillgrid1();//here bind dataset into gridview

}
  Permalink  
Comments
munirajan at 13-Dec-11 3:42am
   
tnx
Prince Antony G at 13-Dec-11 7:12am
   
ok

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

  Print Answers RSS
0 OriginalGriff 325
1 DamithSL 265
2 CPallini 235
3 Sergey Alexandrovich Kryukov 229
4 Maciej Los 190
0 OriginalGriff 5,455
1 DamithSL 4,422
2 Maciej Los 3,860
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,010


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 13 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100