var myVar1 = "Hello";
var myVar2 = "World";
myArray = "['" + myVar1 + "','" + myVar2 + "']";
alert(myArray[0] + " " +myArray[1]);
var myVar1 = "Hello";
var myVar2 = "World";
var tempCode = "myArray = ['" + myVar1 + "','" + myVar2 + "']";
eval(tempCode);
alert(myArray[0] + " " +myArray[1]);
obj.getDataText = function(i, j){
switch(j) {
case 0:
return info[i].accName;
case 1:
return info[i].tableID;
default:
alert('beat me, coz it should never run...');
}
}
function accountdata(accName, tableID )
{
this.accName=accName ;
this.tableID=tableID;
}
obj.info = new Array();
obj.addAccount = function(accName, tableID) {
// push the object in data holder
this.info.push(new accountdata(accName, tableID));
this.rowCountChanged();
};
obj.rowCountChanged = function() {
// set data count
var newCount = this.gridData.length;
this.setDataProperty("count", newCount);
// clear internal row state
var rowValues = [];
for(var i=0; i < newCount; ++i) { rowValues.push(i); }
this.setRowProperty("values", rowValues);
this.setSortProperty("index", null);
// clear selection - if required
//this.setSelectionProperty("index", -1);
//this.setSelectionProperty("values", []);
this.refresh();
};
obj.getDataText = function(i, j){
switch(j) {
case 0:
return this.info[i].accName;
case 1:
return this.info[i].tableID;
default:
alert('beat me, coz it should never run...');
}
}
obj.setDataText = function(value, i, j){
switch(j) {
case 0:
this.info[i].accName = value;
break;
case 1:
this.info[i].tableID = value;
break;
default:
alert('beat me, coz it should never run...');
}
}
.....
.....
This topic is archived.