Table of Contents

Execution order

Opening a UI view (with two sub-views of non-embedded collections)

flowchart TB
    OPENVIEW[/"User action: Open view"/] ---> IN
    NAVIGATEASYNC[/"Code: NavigateAsync()"/] ---> IN
    IN["Initialized"] --> RETING["Retrieving"]
    IN --> SIN1("Sub UI view 1: Initialized")
    IN --> SIN2("Sub UI view 2: Initialized")
    RETING --> |Cancel| END
    RETING --> RETED["Retrieved"]
    RETED --> SRETING["Sub UI view 1: Retrieving"]
    SRETING --> |Cancel| END
    SRETING --> SRETED["Sub UI view 1: Retrieved"] --> END
    RETED --> SRETING2["Sub UI view 2: Retrieving"]
    SRETING2--> |Cancel| END
    SRETING2 --> SRETED2["Sub UI view 2 : Retrieved"] --> END
    END(End)

    style OPENVIEW fill:lightgreen,stroke:gray,color:black
    style NAVIGATEASYNC fill:lightblue,stroke:gray,color:black
    style SIN1 fill:yellow,stroke:gray,color:black
    style SIN2 fill:yellow,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Opening a UI view (with two sub-views of embedded collections)

flowchart TB
    OPENVIEW[/"User action: Open view"/] ---> IN
    NAVIGATEASYNC[/"Code: NavigateAsync()"/] ---> IN
    IN["Initialized"] --> RETING["Retrieving"]
    IN --> SIN1("Sub UI view 1: Initialized")
    IN --> SIN2("Sub UI view 2: Initialized")
    RETING --> |Cancel| END
    RETING --> RETED["Retrieved"] --> END
    END(End)

    style OPENVIEW fill:lightgreen,stroke:gray,color:black
    style NAVIGATEASYNC fill:lightblue,stroke:gray,color:black
    style SIN1 fill:yellow,stroke:gray,color:black
    style SIN2 fill:yellow,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Because embedded collections are loaded directly into their parent, their Retrieved and Retrieving events are not triggered.

Adding

flowchart TB
    ADDBUTTON[/"User action: Add button"/]
    ADDASYNC[/"Code: AddAsync()"/]
    ADDNEWASYNC[/"Code: AddNewAsync()"/]
    INSERTASYNC[/"Code: InsertAsync()"/]
    INSERTNEWASYNC[/"Code: InsertNewAsync()"/]

    ADDBUTTON --> ADDING
    ADDASYNC --> ADDING
    ADDNEWASYNC --> ADDING
    INSERTASYNC --> ADDING
    INSERTNEWASYNC --> ADDING
    ADDING["ItemAdding"] --> ADDED["ItemAdded"] --> END
    ADDING --> |Cancel| END
    END(End)

    style ADDBUTTON fill:lightgreen,stroke:gray,color:black
    style ADDASYNC fill:lightblue,stroke:gray,color:black
    style ADDNEWASYNC fill:lightblue,stroke:gray,color:black
    style INSERTASYNC fill:lightblue,stroke:gray,color:black
    style INSERTNEWASYNC fill:lightblue,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Cloning

flowchart TB
    CLONEBUTTON[/"User action: Clone button"/]
    CLONEASYNC[/"Code: CloneAsync()"/]

    CLONEBUTTON --> CLONING
    CLONEASYNC --> CLONING
    CLONING["ItemCloning"] --> ADDED["ItemAdded"] --> END
    CLONING --> |Cancel| END
    END(End)

    style CLONEBUTTON fill:lightgreen,stroke:gray,color:black
    style CLONEASYNC fill:lightblue,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Removing

flowchart TB
    DELETEDATAASYNC[/"Code: DeleteDataAsync()"/]
    REMOVEBUTTON[/"User action: Remove button"/]
    CONFIRMATIONMESSAGE[/"User action: Confirmation message"/]
    DELETESELECTEDITEMSASYNC[/"Code: DeleteSelectedItemsAsync()"/]
    REMOVING["Removing"]
    ITEMREMOVING["ItemRemoving"]
    ITEMREMOVED["ItemRemoved"]
    END(End)

    REMOVEBUTTON --> REMOVING
    DELETESELECTEDITEMSASYNC --> REMOVING
    REMOVING --> |With confirmation message|CONFIRMATIONMESSAGE
    CONFIRMATIONMESSAGE --> ITEMREMOVING
    REMOVING --> |Without confirmation message|ITEMREMOVING
    DELETEDATAASYNC --> ITEMREMOVING
    CONFIRMATIONMESSAGE --> |Cancel| END
    ITEMREMOVING --> ITEMREMOVED
    ITEMREMOVING --> |Cancel| END
    ITEMREMOVED --> END

    style REMOVEBUTTON fill:lightgreen,stroke:gray,color:black
    style CONFIRMATIONMESSAGE fill:lightgreen,stroke:gray,color:black
    style DELETESELECTEDITEMSASYNC fill:lightblue,stroke:gray,color:black
    style DELETEDATAASYNC fill:lightblue,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

See this article to learn when the confirmation message is displayed when deleting an item.

Saving

flowchart TB
    SAVEBUTTON[/"User action: Save button"/] --> SAVING
    SAVEASYNC[/"Code: SaveAsync()"/] --> SAVING
    SAVING["DataSaving"] --> SAVED["DataSaved"] --> END
    SAVING --> |Cancel| END
    END(End)

    style SAVEBUTTON fill:lightgreen,stroke:gray,color:black
    style SAVEASYNC fill:lightblue,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Position changing

flowchart TB
    CLICKONROW[/"User action: Click on row in datagrid"/] --> CHANGING
    SETPOSITION[/"Code: Set Position property"/] --> CHANGING
    RETRIEVING["Retrieved (in some cases)"] --> CHANGING
    CHANGING["PositionChanging"] --> CHANGED["PositionChanged"] --> END
    CHANGING --> |Cancel| END
    END(End)

    style CLICKONROW fill:lightgreen,stroke:gray,color:black
    style SETPOSITION fill:lightblue,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

See this article to know when a Retrieved event rule can trigger the PositionChanging event rule.

Item selection changing

flowchart TB
    CLICKONROW[/"User action: Click on row selection column in datagrid"/] --> CHANGING
    SELECTALLITEMSASYNC[/"Code: SelectAllItemsAsync()"/] --> CHANGING
    SELECTITEMASYNC[/"Code: SelectItemAsync()"/] --> CHANGING
    UNSELECTALLITEMSASYNC[/"Code: UnselectAllItemsAsync()"/] --> CHANGING
    UNSELECTITEMASYNC[/"Code: UnselectItemAsync()"/] --> CHANGING

    CHANGING["ItemSelectionChanging"] --> CHANGED["ItemSelectionChanged"] --> END
    CHANGING --> |Cancel| END
    END(End)

    style CLICKONROW fill:lightgreen,stroke:gray,color:black
    style SELECTALLITEMSASYNC fill:lightblue,stroke:gray,color:black
    style SELECTITEMASYNC fill:lightblue,stroke:gray,color:black
    style UNSELECTALLITEMSASYNC fill:lightblue,stroke:gray,color:black
    style UNSELECTITEMASYNC fill:lightblue,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Reference retrieving

Lookup suggestions

flowchart TB
    TYPEINLOOKUPINPUT[/"User action: Type something in lookup input"/] --> REFERENCERETRIEVING
    REFERENCERETRIEVING["ReferenceRetrieving"] --> END
    END(End)

    style TYPEINLOOKUPINPUT fill:lightgreen,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Lookup UI view

flowchart TB
    OPENLOOKUPMODAL[/"User action: Open lookup modal"/] --> INITIALIZED
    INITIALIZED["Initialized<br/>(UI view of the lookup)"] --> RETRIEVING
    RETRIEVING["Retrieving<br/>(UI view of the lookup)"] --> REFERENCERETRIEVING
    REFERENCERETRIEVING["ReferenceRetrieving<br/>(UI view displaying the lookup)"] --> RETRIEVED
    RETRIEVED["Retrieved<br/>(UI view of the lookup)"] --> END
    REFRESHLOOKUPMODAL[/"User action: Refresh data in lookup modal"/] --> RETRIEVING
    END(End)

    style OPENLOOKUPMODAL fill:lightgreen,stroke:gray,color:black
    style REFRESHLOOKUPMODAL fill:lightgreen,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black

Reference selected

flowchart TB
    SELECTLOOKUPSUGGESTION[/"User action: Select a suggestion in lookup"/] --> CHANGING
    CHANGING["ReferenceSelected"] --> CHANGED["PropertyChanged"] --> END
    CHANGING --> |The new value is the current value| END
    END(End)

    style SELECTLOOKUPSUGGESTION fill:lightgreen,stroke:gray,color:black
    style END fill:yellow,stroke:gray,color:black