Solved

How to handle editing wrong row when user clicks on a different page?

Posted on 2015-02-24
3
65 Views
Last Modified: 2015-02-26
Hi, I'm using VS2012.
If user clicks on Edit on a row in Gridview control, and then clicks a page number and navigates to a different page, the same row index is applied to that navigated page and that row is now in edit.  
What's the best way to handle this?  Disable navigation when they're in Edit?  
Thank you.
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40630733
I would think that if you navigate away from a row that is in Edit mode, that you would change the mode out of Edit.
0
 

Author Comment

by:lapucca
ID: 40631803
Nope, gridview doesn't do that automatically.  It would be nice if it does that or prevents user from navigating until the user is out of Edit mode.  Is there a quick way to do this in code?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 40633471
If that is what you would like to do, then you might be able to attach an event handler to the RowEditing event, and disable what you need to prevent navigation.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question