Solved

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

Posted on 2008-06-12
2
551 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with consolidating excel files using VB.net 2 29
How to read text with RegEx... 2 25
Where is this file? 3 25
ASP.NET MVC - Views 3 19
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

839 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