Solved

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

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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