Problem: loading xml, rendering grid, setting links in columns
Ok,
I got XML loading and rendering in the grid.
right after the document.write(obj); (to display the grid) I need to parse a few columns and change the values of a specific column to turn them into links.
I have the code and it looks correct.
Here is my problem. The js for turning one of the columns into a link column runs before the grid is rendered - and thus, the links don't get created in the cells.
Is there a way to execute a JS function AFTER the grid has fully rendered? Below, it hasn't really rendered and thus, the rowcount is at 0 - so the ALERT returns a blank pop-up.
I need to adjust the contents of cells because the XML file I'm using doesn't have the information in the correct format I need to create links.
Basically, I'm doing this:
<script>
document.write(obj);
<!-- Set Link Column -->
var i, cellvalue, max = obj.getRowCount();
for (i=0; i<max+1; i++){
cellvalue = obj.getCellValue(13,i);
obj.setCellTemplate(new AW.Templates.Link, 13,i);
obj.setCellLink("http://path/"+cellvalue, 13,i);
alert(cellvalue);
}
obj.refresh()
</script>
Any ideas?
I got XML loading and rendering in the grid.
right after the document.write(obj); (to display the grid) I need to parse a few columns and change the values of a specific column to turn them into links.
I have the code and it looks correct.
Here is my problem. The js for turning one of the columns into a link column runs before the grid is rendered - and thus, the links don't get created in the cells.
Is there a way to execute a JS function AFTER the grid has fully rendered? Below, it hasn't really rendered and thus, the rowcount is at 0 - so the ALERT returns a blank pop-up.
I need to adjust the contents of cells because the XML file I'm using doesn't have the information in the correct format I need to create links.
Basically, I'm doing this:
<script>
document.write(obj);
<!-- Set Link Column -->
var i, cellvalue, max = obj.getRowCount();
for (i=0; i<max+1; i++){
cellvalue = obj.getCellValue(13,i);
obj.setCellTemplate(new AW.Templates.Link, 13,i);
obj.setCellLink("http://path/"+cellvalue, 13,i);
alert(cellvalue);
}
obj.refresh()
</script>
Any ideas?
Carl
February 13,