wrong page of data on select of a GridView row

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!
 
G

Guest

I fixed this. I was recreating the select in Page_Load but needed to do this
in PageIndexChanging event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top