Example
Smartsite SXML |
Copy Code
|
<se:placeholder id="Persons" fieldnames="FirstName,LastName" render="false" />
<se:xmldatatable save="customers" resulttype="datatable">
<se:row>
<se:col name="FirstName">Donald</se:col><se:col name="LastName">Duck</se:col>
</se:row>
<se:row>
<se:col>Mickey</se:col><se:col>Mouse</se:col>
</se:row>
</se:xmldatatable>
Fill the placeholder with data from a datatable.
{placeholder.append(Persons, customers)}
Rows: {datatable.rows.count(placeholder.data(Persons))}
Clear the table.
{buffer.set(mytable, datatable.clone(placeholder.data(Persons)))}
{placeholder.clear(Persons)}
Rows: {datatable.rows.count(placeholder.data(Persons))}
Repopulate the placeholder with the datatable.
{placeholder.append(Persons, $mytable)}
Rows: {datatable.rows.count(placeholder.data(Persons))}
Delete Mickey Mouse
{placeholder.delete(Persons, "LastName='Mouse'")}
Rows: {datatable.rows.count(placeholder.data(Persons))}
Delete the first row
{placeholder.delete(Persons, 1)}
Rows: {datatable.rows.count(placeholder.data(Persons))}
|