How to: load the page with the grid already expanded (Expanded info in Grid)

This section explains the steps needed so that when the page loads, the expanded information of a record is already displayed.

First, you need to have a Web Panel with the 'Expanded info in Grid' configured:

GeneXus Patterns tab for "PersonWWWithNestedDetail", showing the WorkWithPlus pattern instance tree with a Grid node and a red arrow linking the selected "Standard Action (DetailWebComponent)" node to its Properties panel, where GXObject is set to PersonNestedDetail; the preview on the right shows a grid with Id, First Name, Last Name, Full Name, Nick Name, Company, Has Favorite Music Band, and Gender columns with Value placeholders and pagination.

This is explained in the section How to: Create a grid with expanded information (Plain) and How to: Create a grid with expanded information (Grid)

Then, in Start Event you need to load the Web Component, with the following code:

    If &HTTPRequest.Method = HttpMethod.Get
        Grid_DWC.Object = <WebComponent>.Create(<ParameterValues>)
    Endif

Finally, in Grid.Load Event at the bottom of the code generated by WorkWithPlus add the following code:

    &DetailWebComponent.ColumnClass = !'WWIconActionColumn WCD_ActionColumn'
    If &HTTPRequest.Method = HttpMethod.Get and ( <CONDITION> )
        &DetailWebComponent.ColumnClass += !' WCD_Opened'
    EndIf

<CONDITION> is the condition that will define which row of the grid will be expanded.