:: Forum >> Version 2 >>

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
Monday, January 9, 2006
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
Monday, January 9, 2006
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
Monday, January 9, 2006
would you please provide me with an example script?
Shannon Brooks
Monday, January 9, 2006
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
Monday, January 9, 2006
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
Tuesday, January 10, 2006
You can use

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

for(var 
r=0r<rowsr++){
  for(var 
c=0c<columnsc++){
    var 
obj.getCellText(cr);
  }
}

 
Alex (ActiveWidgets)
Tuesday, January 10, 2006
Thanks! My problem now, is that i'm getting a RowCount of 0, regardless of how many rows are in the data...
Shannon Brooks
Tuesday, January 10, 2006
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
Tuesday, January 10, 2006
Ok guys I have solved the issue. Thanks for all the help.

Cheers,

Shannon
Shannon Brooks
Tuesday, January 10, 2006



This topic is archived.

Back to support forum

Forum search