Smartsite SXML CopyCode image 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))}
Example Result CopyCode image Copy Code
Fill the placeholder with data from a datatable.

Rows: 2

Clear the table.


Rows: 0

Repopulate the placeholder with the datatable.

Rows: 2

Delete Mickey Mouse
1
Rows: 1

Delete the first row
1
Rows: 0