1 Reply Latest reply on Mar 9, 2011 2:41 AM by Nuwan,Chamara

    Check if any data in datagrid or Check box status is changed in Flex screen

    anandbk Level 1

      Hi Guys,

       

      In my screen i have one datagrid and 3 check boxes.

       

      And i have Save & Close buttons.

       

      When user clicks on Close button, i have to give an option (message box) to Save the data incase he has changed any data on the screen (may be in datagrid or changed the status of check boxes) before closing the window.

       

      Can any one help me how to check whether any of the data in the screen is changed so that if changed i can display message like "Are you sure you want to close without saving ?".

       

      Thanks,
      Anand.

        • 1. Re: Check if any data in datagrid or Check box status is changed in Flex screen
          Nuwan,Chamara Level 1

          You can have a boolean property called isChanged in the file. And when the user clicks on a checkbox or do some change in the datagrid you can change the value of the "isChanged" property to true from an initial value false. And if the user clicks on the save button you can change the propety's value to false. So if the user clicks on the close button you can check if the isChanged property's value and if it is true then you can show the Alert window.

           

          Hope this helps.