Solved

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

Posted on 2008-06-12
2
537 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

      Install BugTracker on Windows 2008 server Step 1:  Install windows 2008 server 32 bit OS and configure IIS. Step 2:  Install SQL server ( SQL server 2005 or SQL server 2005 Express edition. The installer for 2008  version isn’t very f…
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 …
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

744 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

16 Experts available now in Live!

Get 1:1 Help Now