:: Forum >>

Dynamic List

I am grabbing info from WMI and trying to populate a grid with the data. For each item in WMI it calls the dgdata function and is supposed to append the new data to the variable myData. When the grid is displayed it displays all the data I want but it doesn't break up the cells it's all in the first cell for all rows.

var myData
var myColumns = [
"Process Name", "PID", "PUSE"
];
function dgdata(PName,PID,PUSE)
{
myData = [myData +=[PName,PID,PUSE]];
}
SqeekyPeeps
Friday, May 8, 2009
Your JavaScript code to append to your myData array is incorrect. You'll need to use array methods to add the extra rows. Here's just one of very many links you can find on the web -
http://www.devguru.com/Technologies/Ecmascript/Quickref/array.html
Look at the methods section and keep in mind that you've got an array of arrays (rows) rather than a simple array.
Anthony
Friday, May 8, 2009

This topic is archived.


Back to support forum

Forum search