I was wondering instead of the usual functionality where when you add a record or make an update to a preexisting record and you have your records sorted in the gridview by last name, So if you are on the lastpage in a gridview and you update a record that
has the letter Z as the first letter in it's last name like Zurich and you change it to Adams then select update and you are still sitting at the last page of the gridview or the records with lastnames starting with Z. It appears the record you just updated
is now gone. instead of this normal behavior of the gridview after selecting update, I was wondering how would you get the gridview to go to the page where the record is now located in this case to the page with last names beginning with A. Thanks for any
help.
I was wondering how would you get the gridview to go to the page where the record is now located in this case to the page with last names beginning with A. Thanks for any help.
Hello,
Since your Select statement should be ordered by the first alphabet, so when inserted successfully, please handle the something event related to Inserted and then set the GridView's PageIndex to 0 (meaning 1st page).
RSquared
Member
277 Points
395 Posts
Gridview Adding and Updating a Record
Nov 19, 2012 06:37 PM|LINK
I was wondering instead of the usual functionality where when you add a record or make an update to a preexisting record and you have your records sorted in the gridview by last name, So if you are on the lastpage in a gridview and you update a record that has the letter Z as the first letter in it's last name like Zurich and you change it to Adams then select update and you are still sitting at the last page of the gridview or the records with lastnames starting with Z. It appears the record you just updated is now gone. instead of this normal behavior of the gridview after selecting update, I was wondering how would you get the gridview to go to the page where the record is now located in this case to the page with last names beginning with A. Thanks for any help.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Gridview Adding and Updating a Record
Nov 20, 2012 06:48 AM|LINK
Hello,
Since your Select statement should be ordered by the first alphabet, so when inserted successfully, please handle the something event related to Inserted and then set the GridView's PageIndex to 0 (meaning 1st page).
RSquared
Member
277 Points
395 Posts
Re: Gridview Adding and Updating a Record
Nov 20, 2012 02:26 PM|LINK
Let me give this a try.