Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
titleFormatting a grid view
linenumberstrue
<view id="com.cohga.html.client.main.gridView">
        <label>Data</label>
        <location>center.south</location>
        <toolbar>
                <!-- toolbar items go here -->
        </toolbar>

        <!-- override column widths -->
        <format>
                <!-- set column widths for columns in a specific data -->
                <data id="ar_property_details">
                        <column id="PropNo" width="20"/>
                        <column id="OwnerName" width="200"/>
                </data>
                <data id="ar_road_details">
                        <column id="Status" width="10"/>
                        <column id="Old_Status" hidden="true"/>
                </data>
                <!-- set column width globally for columns in any data -->
                <column id="RoadName" width="200"/>
                <column id="RoadType" width="50"/>
                <column id="Suburb" width="250"/>
                <column id="oid" hidden="true" align="right"/>
        </format>
</view>
Code Block
xml
xml
titleFormatting with snippet (for re-use of formatting)
linenumberstrue
<client:format id="custom">
        <!-- set column widths for columns in a specific data -->
        <data id="ar_property_details">
                <column id="PropNo" width="20" align="right"/>
                <column id="OwnerName" width="200"/>
        </data>
        <data id="ar_road_details">
                <column id="Status" width="10"/>
        </data>
        <!-- set column width globally for columns in any data -->
        <column id="RoadName" width="200"/>
        <column id="RoadType" width="50"/>
        <column id="Suburb" width="250"/>
</client:format>

<client:config id="test">
        <!-- there should be other config items here -->

        <view id="com.cohga.html.client.main.gridView">
                <label>Data</label>
                <location>center.south</location>
                <toolbar>
                        <!-- toolbar items go here -->
                </toolbar>

                <!-- override formatting -->
                <format ref="custom"/>
        </view>
</client:config>

...