Alpha Video Training
Results 1 to 2 of 2

Thread: Prevent a parent "dirty" status from changing when adding a new item to a list

  1. #1
    Member compuaid's Avatar
    Real Name
    Brad Weaver
    Join Date
    Aug 2007
    Location
    Ottawa, ON
    Posts
    368

    Default Prevent a parent "dirty" status from changing when adding a new item to a list

    I thought I'd share something that had eluded me. I have a list on a form that I want to be able to have the user click a button and open a new form to add to the list. I don't want the parent form's status to change to dirty if nothing else has changed and I also want the parent form to remain dirty if it already was. The solution, I found, was to add the following code to the list OnBeforeAddRows event. The code was derived from an earlier solution preventing clicking or opening a list item from changing the parent form status:

    Code:
    var flagUXIsDirty = false;
    flagUXIsDirty = {dialog.object}._dirtyRows[0];
    
    if(flagUXIsDirty == false) {
        setTimeout (function() {
            {dialog.object}._setRowState(1,false);
        },10);
    }
    
    return true;
    Brad Weaver, President
    ComputerAid International
    Ottawa ON Canada
    Versailles KY USA
    www.compuaid.com

  2. #2
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    976

    Default Re: Prevent a parent "dirty" status from changing when adding a new item to a list

    Thank you for sharing this! Was looking like crazy how to set the UX to "not dirty"...

Similar Threads

  1. UX LIST won't save data - "No work to do (No dirty fields in table)"
    By RichCPT in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 03-17-2017, 12:34 PM
  2. Replies: 6
    Last Post: 12-17-2016, 07:56 AM
  3. "Double Quotes" In A List Template Item Click Event
    By iRadiate in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 08-10-2016, 10:05 PM
  4. Must include "index.a5w" to prevent "403 Forbidden"
    By twwtc in forum Application Server Version 10 - Web/Browser Applications
    Replies: 23
    Last Post: 11-11-2010, 10:08 AM
  5. property-sheet "Record List Combo" item type
    By Daniel Weiss in forum Web Application Server v7
    Replies: 0
    Last Post: 01-26-2006, 12:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •