Solved

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

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now