473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

wrong page of data on select of a GridView row

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!
Aug 20 '06 #1
1 1321
I fixed this. I was recreating the select in Page_Load but needed to do this
in PageIndexChanging event.

"Dabbler" wrote:
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!
Aug 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: ÀÏÆÅ»³ÔÐ5¸öÔ | last post by:
I want use dropdownlist contral in gridview but have trouble now mycode here: i'm very sorry for my poor english <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
2
by: Damon | last post by:
Help! Need this fixed ASAP. I have a GridView/DetailsView master/details form set up, with both bound to separate ObjectDataSource objects. Both the GridView and the DetailsView have a...
8
by: William Buchanan | last post by:
Hi folks I have a "Search" text box and LinkButton in my master page. When this is submitted, I do a Server.Transfer to a page which contains a gridview. The gridview is filtered on a hidden...
0
by: John Smith | last post by:
I still have not gotten this damn thing figured out and I'm asking for help one last time before I give up on it. I have a user control that contains a paged gridview control. The master page...
3
by: tarscher | last post by:
Hi all, I have a gridview populated with data coming from a dataset (created via the wizard). The data shown in the gridview is dependent on the the choice of a control (dropdown with...
4
by: Rob Meade | last post by:
Hi all, I played with my first bit of AJAX the other week and was pleasantly surprised that I achieved my goal..now I'd like to try something else.. Question... If I have an updatePanel,...
3
by: jobs | last post by:
I have a gridview on another page with a column that will link to this page. I'm flirting with design options, but am considering a template field with hyperlink navigateurl that includes a query...
8
by: =?Utf-8?B?VGltIFRhZmZsaW5nZXI=?= | last post by:
Hello, I'm developing an application with one parent table and 12 child tables. The parent table is patient information and the children contain such things as lab results, medications,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.