• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 69
  • Last Modified:

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

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
lapucca
Asked:
lapucca
  • 2
1 Solution
 
Bob LearnedCommented:
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
 
lapuccaAuthor Commented:
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
 
Bob LearnedCommented:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now