Learn how to a build a cloud-first strategyRegister Now


Force Gridview Edit to complete before leaving control

Posted on 2007-10-05
Medium Priority
Last Modified: 2013-11-26
I have a gridview that allows users to Edit the rows. On top of the gridview, I have a formview I use for data entry inserts. Problem I find is that new users click on the gridview Edit, make the change and don't click the UPDATE or CANCEL option. They then select the formview Insert link and the Insert form loads, with the gridvew record still in edit mode under the formview.

I would like a way to force the user to either Update or Cancel the edit before they move off the griview control. Is that possible?
Question by:Thirt
  • 2
  • 2
LVL 11

Expert Comment

ID: 20023021
Could you disable the Insert button on clicking the Edit button and then re-enable it again on the click of the Cancel or Update?

Author Comment

ID: 20023067
Well, that would require referncing the Formview Insertitem template controls...which I think is possible but not friendly. But there is also a dropdown I use above the gridview as a filter for the gridview results. I would need to disable that as well? I have a link to another form.... I guess that's my only option.
LVL 11

Accepted Solution

cmhunty earned 2000 total points
ID: 20023100
When you click the insert button, you could iterate through the grid to check the status of each of the rows to see if any are in update mode. You could place this in a method and call that before you apply the filter also. Should there be any row being updated, you could exit the sub and warn the user that there is a record still being edited.

Author Comment

ID: 20044699
Hmmm, I think I actually understand what you said. Let me see how far I get before I run into a brick wall.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Integration Management Part 2
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month20 days, 15 hours left to enroll

864 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