Problem with .setrows in Grid V1
I am trying to display two grids on one webpage. So, I have a data island that contains my XML:
Then, I build the grid as follows:
What I expect from this is that the grid will only display the rows with a RowType of "PRIMARY". What the grid actually does is disaply all of the rows. In fact, I can change that .setRows() statement to this:
...and I still get all of the rows. What am I doing wrong?
<root>
<row AccountID="2" AccountNumber="100" RowType="PRIMARY"/>
<row AccountID="4" AccountNumber="101" RowType="PRIMARY"/>
<row AccountID="6" AccountNumber="102" RowType="SECONDARY"/>
</root>
Then, I build the grid as follows:
var objGrid2 = new Active.Controls.Grid;
objGrid2.setColumnProperty("texts", ["AccountID", "Account Number"]);
var objGrid2Row = new Active.Templates.Row;
objGrid2.setTemplate("row", objGrid2Row);
var objGrid2XML = new Active.XML.Table;
objGrid2XML.setXML(GridXML.xml); // GridXML is my data island
objGrid2XML.setRows("//root/row[@RowType='PRIMARY']");
objGrid2XML.setColumns(["@AccountID", "@AccountNumber"]);
objGrid2.setDataModel(objGrid2XML);
document.write(objGrid2);
What I expect from this is that the grid will only display the rows with a RowType of "PRIMARY". What the grid actually does is disaply all of the rows. In fact, I can change that .setRows() statement to this:
objGrid2XML.setRows("//root/row[@RowType='ChickenDance']");
...and I still get all of the rows. What am I doing wrong?
Duane Roelands
June 8,