Hello Mariam,
without knowing your implementation, difficult to say what is wrong. An idea:
When you invoke InvalidateViewState() for the dialog 1, the method UpdateViewState() in this dialog is executed after a short delay. Does the method perform all the updates you expect? To verify it, you can add trace statement to the method and log its execution.
Possibly, executing UpdateViewState() is not sufficient in your case. Please check, what should be updated in dialog 1 and where is the code to perform this update?
I could not find any related EW example for version 10 for using enumeration functions etc.
Please take a look at the chapter Enumerate and search for existing Dialogs. It describes the available methods and shows few examples with two of them.
Nevertheless, you found that the Owner of dialog 2 is dialog 1. That means you present dialog 2 in context of dialog 1. You can therefore access the dialog 1 via Owner inside dialog 2.
In this case your approach works. In most typical application cases, however, you present the dialogs inside some common owner component. In this case when dialog 1 presents dialog 2, perform the presentation in context of the Owner of dialog 1:
// Inside dialog 1
Owner.PresentDialog( dialog2, ... );
Then being in dialog 2 you can invoke the method Owner.GetDialogAtIndex(1) which should return the dialog preceding the actual dialog. Other approach would be to invoke Owner.FindDialogByClass( Unit::Dialog1Class ). Replace Unit::Dialog1Class by the real class name of the GUI component implementing the dialog 1.
I hope it helps you further.
Best regards
Paul Banach