:: Forum >>

bug: hyperlinking entry removes all data from grid

I have a grid with 3 columns. One of the column values has data with a hyperlink. When I click on the hyperlink, all data from the grid dissapears. I can make it come back by clicking on the header twice (to sort). This, obviously, is not ideal... any ideas as to what I can do?

<style>
#activityDataGrid {height: 160px; width: 100%; margin: 0px; border: none; font: menu;}
#activityDataGrid .aw-column-0 {width: 24; }
#activityDataGrid .aw-column-1 {width: 120; }
#activityDataGrid .aw-column-2 {width: 120; }
#activityDataGrid .aw-column-3 {width: 295; }

.aw-row-selector {text-align: center}
.aw-grid-cell {border-right: 1px solid threedlightshadow;}
.aw-grid-row {border-bottom: 1px solid threedlightshadow;}

.aw-alternate-even {background: #FFFFFF;}
.aw-alternate-odd {background: #D6DFFF;}
.aw-grid-row {height: 20px; border-bottom: 1px solid #CCCCCC}
.aw-row-selector {width: 20px; text-align: center}
.aw-mouseover-row .aw-row-selector {color: red;}
</style>
<script language="javascript">
var activityData = [
[
"<br/>",
"10/17/05 10:05 AM",
"Joe Hudson",
"<a href='/moses/web/activities/ShowActivity?activity=6'>Callback: bbb</a>"
],
[
"<img src='/static/images/icons/16x16/check.gif'/>",
"10/12/05 10:15 AM",
"Joe Hudson",
"<a href='/moses/web/activities/ShowActivity?activity=8'>Home Inspection</a>"
],
[
"<br/>",
"10/11/05 2:47 PM",
"Joe Hudson",
"<a href='/moses/web/activities/ShowActivity?activity=9'>Callback: fsdf</a>"
],
[
"<img src='/static/images/icons/16x16/check.gif'/>",
"10/10/05 4:55 PM",
"Joe Hudson",
"<a href='/moses/web/activities/ShowActivity?activity=10'>Callback: gglksaf</a>"
],
[
"<img src='/static/images/icons/16x16/check.gif'/>",
"10/6/05 7:30 PM",
"Joe Hudson",
"<a href='/moses/web/activities/ShowActivity?activity=2'>Drive-by Inspection</a>"
],
[
"<img src='/static/images/icons/16x16/check.gif'/>",
"10/4/05 11:53 PM",
"Joe Hudson",
"<a href='/moses/web/activities/ShowActivity?activity=3'>Callback: test</a>"
],
];
var obj = new AW.UI.Grid;
obj.setCellText(activityData);
obj.setHeaderText(["","Activity Date","Owner","Description",]);
obj.setRowCount(6);
obj.setColumnCount(4);
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
obj.setSelectorWidth(28);
obj.setHeaderHeight(20);
obj.setSelectionMode("single-row");
obj.setId("activityDataGrid");
document.write(obj);
</script>
Joe Hudson
Tuesday, October 11, 2005
I found another scenario where using --obj.setCellText(myData)-- duplicates first row for every row in the grid.
This should be investigated !!.
Anyway try the old formula (for me is working fine):
obj.setCellText(function(col, row){return activityData[row][col]});
Carlos
Tuesday, October 11, 2005
I don't get it. When you click on a hyperlink, it loads that new page into your current page replacing the grid alltogether. At what point do you see a grid with no data? If you hit the back button it reloads the page and the data is there. Please provide more of a description of your scenario so I can re-produce what you are seeing.
Jim Hunter
Wednesday, October 12, 2005
I can reproduce it with Joe's code, and it happens on first load, all cells are empty (blank).
I can not locate between my few tests ;-) the "multiple first row" scenario but I remember that solve it that way .... I'll try to fid it.
Cheers
Carlos
Wednesday, October 12, 2005
Well, I saw it the first time I use Joe's code, but now can't reproduce it again...... Beta-1 Ghost ???
Carlos
Wednesday, October 12, 2005
Thank you all for taking the time to investigate!

Joe
Joe Hudson
Wednesday, October 12, 2005

This topic is archived.


Back to support forum

Forum search