3.2.0

Access table data like a recordset

Hi All,

I was just wondering if there is a way to access the data that's populated into the table as though it was a recordset?

Please let me know!

Thanks.
Shannon Brooks
January 9,
The data is provides via a Javascript array (at least that's the way I use it), and you have full access to the array at all times.
What sort of things are you looking to do with the data?
Jim Hunter
January 9,
I need to monitor the data, and perform commands as certain data changes. I have written a script that monitors a text file and will refresh the grid when the file size changes.
Shannon Brooks
January 9,
would you please provide me with an example script?
Shannon Brooks
January 9,
an example script of what? I am confused on what you are really trying to do with the grid and it's data that you are not already doing?
Jim Hunter
January 9,
Sorry for the confusion...

I already have the script that monitors the text file and displays a grid in my web page. However, I would like to develop a separate script that will allow me to monitor specific data. Ideally, I need to iterate through the data much like a recordset or array, and make use of the data. All I need from you is an example call of this array, and where it's coming from.

I thought that I might be able to use what has already created, rather than looking for another option.
Shannon Brooks
January 10,
You can use

var columns = obj.getColumnCount();
var rows = obj.getRowCount();

for(var r=0; r<rows; r++){
  for(var c=0; c<columns; c++){
    var t = obj.getCellText(c, r);
  }
}
Alex (ActiveWidgets)
January 10,
Thanks! My problem now, is that i'm getting a RowCount of 0, regardless of how many rows are in the data...
Shannon Brooks
January 10,
I added a setTimeout to wait for the data to finish loading, and now it works.

I'm getting a script error when calling obj.getCellText(c,r) now though.
Shannon Brooks
January 10,
Ok guys I have solved the issue. Thanks for all the help.

Cheers,

Shannon
Shannon Brooks
January 10,

This topic is archived.

See also:


Back to support forum