Fired event rowupdating which 100 dating in international new site zealand

Rated 3.96/5 based on 603 customer reviews

Most Web Developers have come across this problem at one time or another, how do I stop someone navigating away from a page if they have not saved any changes they have made?

The answer is that you need to employ ‘Dirty Checking’, basically set a flag when the page data is changed and check it if the user tries to navigate away.

Sounds simple (and in many instances it maybe so) but I have encountered a problem recently (today! Basically I had a Master page with the following Javascript in the head section: So when the page is loaded the edittable controls have an attribute added which will execute the set Dirty function and set the dirty status accordingly. Well nothing, everything works as expected – but enter the . The dirty checking was then added to a page that contained a . The Grid View allows in-line editing and can be configured to commit changes to the underlying database upon clicking the ‘Ok’ button within the editted row.

Note that the Save button is configured to clear the Dirty Status (i.e. However, as the Grid View only held part of the information on the page we wanted it all to be committed at the same time, i.e.

This could easily be caught in the Row Updated event and seemed a logical choice and initially seemed to work as expected – until one of those damn tester people got hold of it.

The Javascript code in the Master Page was updated by adding a new ‘Is Editing’ function and updating the condition within the check Exit function.

So now we could flag a page as being in Edit Mode and bail out of check Exit if it was (even if the apge was flagged as being dirty).

But we were not out of the wood quite yet – we still needed to wire the new functions into the rest of the code.

If they make changes to the data fields and click OK then the flags are reset accordingly.

Now we just need to handle the situation where the user clicks on the Cancel button of a row in Edit mode. It may not be the only, or the best way but it solved the problem that we encountered.

Leave a Reply