";
for(var k:int=0; k < dg.columns.length; k++) {
//Do we still have a valid item?
if(dg.dataProvider.getItemAt(j) != undefined && dg.dataProvider.getItemAt(j) != null) {
//Check to see if the user specified a labelfunction which we must
//use instead of the dataField
if(dg.columns[k].labelFunction != undefined) {
str += "| "+dg.columns[k].labelFunction(dg.dataProvider.getItemAt(j),dg.columns[k].dataField)+" | ";
} else {
//Our dataprovider contains the real data
//We need the column information (dataField)
//to specify which key to use.
str += ""+dg.dataProvider.getItemAt(j)[dg.columns[k].dataField]+" | ";
}
}
}
str += "";
}
str+="