Solved

Using BulkEditGridView, need to Save and Navigate with single "Continue" click

Posted on 2008-06-12
2
540 Views
Last Modified: 2013-11-26
I am using BulkEditGridView in a multi-page data-entry site. I set SaveButtonID = Button1 where Button1 is a WebControls.Button labeled SAVE.  It works as it is supposed to. After saving the data, the user must click a WebControls.HyperLink control with NavigateUrl=~/MyNextPage.aspx to get to the next page to enter more data. I tried to combine the process of saving data and moving to the next page by placing VB statement Response.Redirect(~/MyNextPage.aspx) in the click event of Button1. This sends the user to the next page but does not save the data.

If it is possible to combine the two tasks into a Continue operation triggered by a single click, I would prefer that it be done in the HyperLink, although using the Button would still be an improvement. Any ideas? Thanks!

(Clearly this type of operation is possible, since I have seen it used on a number of sites - like asking this question right now on this site! - but it seems likely that it is being accomplished with something other than BulkEditGridView.  Should I be looking at a different language/technique to make this easier??)

0
Comment
Question by:AutomateMyOffice
2 Comments
 
LVL 22

Expert Comment

by:prairiedog
ID: 21770434
Interestingly, you asked this question at another site, and the author just answered your question:
http://dotnetdiscussion.net/2008/04/06/aspnet-how-to-use-bulkeditgridview-to-save-hours-in-database-editing/
0
 

Accepted Solution

by:
AutomateMyOffice earned 0 total points
ID: 21781640
I did, in fact, ask the question elsewhere.  While the answer provided by the author was not everything I needed, it pointed me in the right direction.  
The way I ended up going was to use the RowUpdated event and increment a counter for each row that got updated every time the event fired.  I compared this to a total count of dirty rows obtained within the click event of the SaveButton from the value of GridView1.DirtyRows.Count.  When the rows updated matched the total dirty rows, I knew I was done updating and could then redirect to the next page.  Works great!
Also found that while the HyperLink control is not appropriate to use as a SaveButton, the LinkButton control acts like a HyperLink and initiates the save process just like a Button control.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

A Change in PHP Behavior with Session Write Short Circuit (http://php.net/manual/en/book.session.php#116217) (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

910 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

21 Experts available now in Live!

Get 1:1 Help Now