wrong page of data on select of a GridView row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a GridView attached to a SqlDataSource control. In the codebehind I
modify the SqlDataSource based on users choice of search column and search
value which I use to generate the select statement for the SqlDataSource. The
problem is the select I create from the users entries is not saved in the
state view, so I reissue the build of the select in Page_Load.

When the user selects a row with select button it's pulling up the row from
the first page instead of off the current page.

Any suggestions on how to solve this problem?



Thanks much!
 
I fixed this. I was recreating the select in Page_Load but needed to do this
in PageIndexChanging event.
 
Back
Top