[CLOSED] Problem with isDirty

  1. #1

    [CLOSED] Problem with isDirty

    Hi all,

    i have a problem with isDirty property of formpanel.
    I need to advise my users about changed values on exit button click.
    But when i load the form panel and i load my data for modify, the form detect (obviously) this action like a change.
    How do I know if the form is changed after data load?

    I have also this problem with some field. I need to check if this fields are changed.
    I have seen one post when Vladimir suggests ResetOriginalValue method.
    This method work fine, but if i call a Reset() on the form i obtain the loaded data, not an empty field.

    Any suggestions?

    Thanks!
    Last edited by Daniil; Jan 28, 2014 at 2:29 AM. Reason: [CLOSED]
  2. #2
    Hi @infotext,

    How do I know if the form is changed after data load?
    I guess you should reset the dirty status for all the fields by calling its resetOriginalValue.

    This method work fine, but if i call a Reset() on the form i obtain the loaded data, not an empty field.
    If you need just empty fields, you can call the fields' clear method instead of the reset one. The reset method resets the current field value to the originalValue (which you change by a resetOriginalValue call).
  3. #3
    Hi Daniil,

    many thanks for your suggestion. I think i find a good solution.

    You can close.

    Thanks!

Similar Threads

  1. isDirty and textField
    By houdatahbaz in forum 1.x Help
    Replies: 4
    Last Post: Sep 01, 2011, 10:23 PM
  2. [CLOSED] [1.0] FormPanel isDirty() problem with CompositeField
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 14, 2010, 6:57 PM
  3. [CLOSED] isDirty() and SelectBox
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 07, 2010, 1:42 PM
  4. form isDirty
    By [WP]joju in forum 1.x Help
    Replies: 5
    Last Post: Jun 22, 2010, 10:53 PM
  5. [CLOSED] another isDirty() issue
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 08, 2010, 5:53 AM

Posting Permissions