-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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>
2 | No.2 Revision |
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>