[CLOSED] Formpanel - set isDirty() to false onload of page

  1. #1

    [CLOSED] Formpanel - set isDirty() to false onload of page

    In my cshtml page, i have a formpanel.
    This formpanel has lots of controls within it.
    On Ext.onReady() i set values to some of the controls, so for the formpanel FieldChange event is getting triggered.
    Now on a buttons click (even when user has not changed any field value) i check for formpanel isDirty(). it always returns true.
    As a thought is it possible to set isDirty of the form to false after setting control values in Ext.onReady event.
    So as to trap user made change again through isDirty().
    Last edited by Daniil; Aug 13, 2013 at 4:47 AM. Reason: [CLOSED]
  2. #2
    Hi @PriceRightHTML5team,

    I think it could be enough to set up TrackResetOnLoad="true" for a FormPanel in your scenario.
  3. #3
    Hi Daniil,
    I Applied to the form
    but still
    is always true (even when user has not made any changes to the form controls).

    Following is my script in Ext.onReady event.

            App.cntrlnm.hide();    // Hide Alternate Accordian
    Last edited by Daniil; Aug 05, 2013 at 7:35 AM. Reason: Please use [CODE] tags
  4. #4
    I thought you use a form's setValues method.

    For you case, you should make a field not dirty.
    App.Cmbxyz.originalValue = App.Cmbxyz.getValue(); // to reset its dirty
  5. #5
    Hi Daniil,
    I checked the value of isDirty() at very begining of Ext.onRead() i.e. before setting/updating control values to through script, it is true

            App.Frmnm.getForm().isDirty();    // shows true
            App.CmbboxoriginalValue = App.Cmbbox.getValue();
    I guess it should have been false
  6. #6
    Please provide a test case.

Similar Threads

  1. Replies: 1
    Last Post: May 13, 2013, 3:40 PM
  2. Replies: 2
    Last Post: Apr 18, 2013, 3:49 AM
  3. gridpanel dinamic onload page
    By maxdiable in forum 1.x Help
    Replies: 1
    Last Post: Feb 16, 2012, 9:07 AM
  4. Replies: 1
    Last Post: Dec 14, 2010, 7:57 PM
  5. [CLOSED] how to set Formpanel isdirty=false
    By vali1993 in forum 1.x Premium Help
    Replies: 6
    Last Post: Jul 30, 2010, 3:35 PM

Tags for this Thread

Posting Permissions