Revision history [back]

click to hide/show revision 1
initial version

answered 2013-05-08 11:44:48 +0800

cor3000 gravatar image cor3000

You can achieve that in a <grid> or <listbox> using model and Dynamic Template. Define a template with <textbox>, and another one with a <datebox>, and switch the template name according to the type of each element in the listModel.

This example will switch the content according to the value in the type attribute of each element

<grid model="@load(vm.listModel) @template(each.type)">
    <rows>
        <template name="date">
            <row>
                <textbox></textbox>
            </row>
        </template>
        <template name="text">
            <row>
                <datebox></datebox>
            </row>
        </template>
    </rows>
</grid>

You can achieve that in a <grid> or <listbox> using model and Dynamic Template. Define a template with <textbox>, and another one with a <datebox>, and switch the template name according to the type of each element in the listModel.

This example will switch the content according to the value in the type attribute of each element

<grid model="@load(vm.listModel) @template(each.type)">
    <rows>
        <template name="date">
            <row>
                <textbox></textbox>
<datebox></datebox>
            </row>
        </template>
        <template name="text">
            <row>
                <datebox></datebox>
<textbox></textbox>
            </row>
        </template>
    </rows>
</grid>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More