Solved

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

Posted on 2015-02-24
3
61 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
  • 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

785 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