<script>
var table = new Active.XML.Table;
table.setURL("companies-simple.xml");
table.request();
var obj = new Active.Controls.Grid;
obj.setModel("data", table);
document.write(obj);
<script>
function AddRow()
{
var dataXmlDoc = obj.getDataProperty('XML');
var rootNode = dataXmlDoc.documentElement;
var newRow = dataXmlDoc.createElement( "company" );
[b] rootNode.insertBefore( newRow, rootNode.firstChild);
//rootNode.appendChild(newRow);[/b]
obj.setRowProperty("count", rootNode.childNodes.length);
obj.refresh();
}
This topic is archived.