:: Documentation >>

rows

Specifies the XPath expression for the table rows.

The default rows XPath is "*" - selecting all child nodes under the table root element. Use setRows(xpath) to specify different location or subset (filter) of the row nodes.

Syntax

var value = obj.getRows(); 
obj.setRows(value);        

Examples

The following example shows how to filter the rows based on the child element value.

<xml id="data">
    <orders>
        <order id="101">
            <product>RedWidget</product>
            <price>456.00</price>
            <qty>10</qty>
        </order>
        <order id="102">
            <product>BlueWidget</product>
            <price>123.00</price>
            <qty>1</qty>
        </order>
    </orders>
</xml>

<script>

    var table = new AW.XML.Table;
    table.setRows("order[price<200]"); // set rows XPath
    table.setXML(document.getElementById("data"));

    var obj = new AW.UI.Grid;
    obj.setCellModel(table);
    obj.setColumnCount(3);
    obj.setRowCount(2);
    document.write(obj);

</script>

See also

Set table, columns XPath

Comments

How to I remove rows in the table.response before the grid is generated? Carl (5)
.setRows appears to be broken (1)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5