Thursday, January 3, 2008

Avoiding the Data has changed warning

Often time, you might create pages with scrolls/grids that you populate thru people code.
for e.g. you invoke the insert row function and then set the values of various fields.
If this is done in the component pre and post build events, then these rows are not flagged as new/changed.
However, if these rowsets are populated after the page is dsiplayed( for e.g. whne the user clicks a button ), the rows are flagged as new and changed. Consequently, when the user moves away from the page, the data has changed warning will be issued.

To avoid that(assuming that you do not want to display that warning message) you can set the property on the component. In the Use tab of the components properties, uncheck the Disable Saving Page. This will do the trick.

I bet there might be other options.

No comments: