3.2.0

Getting text from an AW.XML.Table cell.

I'm trying to retrieve text from any column in a selected row from the new AW.XML.Table objects, and having a heck of a time with it. Im using version 2.0.0, Std-developer code

I've read lots of forum posts on this, and they cover a whole range of beta versions and early bugs, but they don't seem to work for this release version. Based on various of these posts, and based on the documentation of AW.XML.Table (such as it is at this point), I've tried using various forms of the following:

myTable.getText(0,0)
myTable.getNode(0,0).text, getNode(0,0).text()
myTable.getNode(0,0).getText, getNode(0,0).getText()
myTable.getValue(0,0)
myTable.getNode(0,0).value, getNode(0,0).value()
myTable.getNode(0,0).getValue, getNode(0,0).getValue()
myTable.getData(0,0)
myTable.getNode(0,0).data, getNode(0,0).data()
myTable.getNode(0,0).getDAta, getNode(0,0).getData()
myTable.and probably several others.

I've also seen the comments and the fix for formatting problems, but I'm not worrying about formatting yet.

I have managed to extract the row count, so I'm pretty sure I'm addressing the table object correctly, and that it does contain the data I can see in the grid. I can also get the data I want directly from the grid using this.getCellText(column, row) within the MyGrid.onRowClicked(event,row) event.

So my simple question is, how to I extract the text of cell(row, column) form an AW.XML.Table from an external JS routine. I must be missing something really simple here, but I just haven't found it yet.

Thanks for any help on this.

JFE.
Jack Emmerichs
May 1,
Jack,

regardless of the data source obj.getCellText(col, row) should give you the cell text. If you want to get it from the XML source directly - it is myTable.getData(col, row) for unformatted value or myTable.getNode(col, row) for XML node reference. The only possible problem - you should wait until the data has arrived - will not work if you call immediately after myTable.request().
Alex (ActiveWidgets)
May 2,
Thanks for the quick response Alex.

The data has already been visible in the grid, which is why getCellText works. I'm pretty sure I tried getNode, but didn't know how to get the text from the node. However, I may not have tried getData(col,row), so that's probably what I need.

JFE.
Jack Emmerichs
May 2,

This topic is archived.

See also:


Back to support forum