Shifting Rows
The order of rows display is defined by the order of declaring these rows in the layout
section of an XML file. When some row is redefined in the customization file it is shifted to the bottom of the grid it belongs to.
To demonstrate this behavior let us consider the following examples. The simple Billing screen we considered earlier is taken for demonstration.
The layout
section of the original screen XML file is the following:
<layout>
<!-- This is a grid that defines order of elements display -->
<grid id="dataMisc">
<row id="SampleID">
<cell labelfor="SampleID">`Sample ID`</cell>
<cell>SampleID</cell>
</row>
<row id="SampleName">
<cell labelfor="SampleName">`Sample Name`</cell>
<cell>SampleName</cell>
</row>
<row id="SampleDescription">
<cell labelfor="SampleDescription">`Sample Description`</cell>
<cell>SampleDescription</cell>
</row>
</grid>
<!-- This is a grid that displays buttons -->
<grid id="buttons" class="controlsLayout">
<row id="buttons">
<cell class="miscButtons">" "</cell>
<cell class="mainButtons">" " Edit exit</cell>
</row>
</grid>
</layout>
Example 1
-
Customize the original file as the following:
<window id="window_id"> <layout> <grid id="dataMisc"> <row id="SampleID"> <cell labelfor="SampleID">`Sample ID`</cell> <cell>SampleID</cell> </row> </grid> </layout> </window>
-
After applying customization Sample ID row is shifted to the grid bottom:
Pay attention, that none of row attributes are changed or added in customization file. Row shift is made by just mentioning it in the customization file.
Example 2
-
Add to the customization file from the first example declaration of the
SampleDescription
row:<window id="window_id"> <layout> <grid id="dataMisc"> <row id="SampleID"> <cell labelfor="SampleID">`Sample ID`</cell> <cell>SampleID</cell> </row> <row id="SampleDescription"> <cell labelfor="SampleDescription">`Sample Description`</cell> <cell>SampleDescription</cell> </row> </grid> </layout> </window>
-
After applying customization Sample ID and Sample Description rows are shifted to the grid bottom in the order of their declaration in the customization file:
In Billing, the order of rows display is defined by the order specified in a screen original XML file. To change the order of rows display use before
or after
location attributes.