2 gridview paging problem

 In my lastest working task, I meet a problem , the case is as below.

 

A page have two gridview,  for example gridview1,gridview2.

 

and all of them bind to seperate objectdatasource.

 

when click gridview1, It trigger gridview2 to show datas.

 

and gridview2 support paging. 

 

when i click a record in gridview1 , then gridview2 show the datas which relate with the record in gridview1. and then I click paging button ,jump to page 2.

 

Then I  click another record in gridview1 , and then gridview2 show the datas which relate with the record. but the current pageindex is till page2. So there are some problem.

 

After search the material in google. i found that you must initial the currentpage index to 0 before bind data to gridview2.

 

 

 

 

 

posted @ 2010-06-30 09:29  C.fly  阅读(336)  评论(0编辑  收藏  举报