java-neandertal missing the rowboat
First I'd like to say how sweet ActiveWidgets grid control is ;)
I seem to be a java-neandertal and for the life of me, I cant figure out what stupid little mistake I am making to prevent my row colors from working.. .
ASP code (modified activewidgets_grid, found in activewidgets.asp) :
====================================================
<script>
<% response.write columns & vbNewLine
response.write rows & vbNewLine %>
try {
var <% = name %>= new Active.Controls.Grid;
<% = name %>.setRowCount(<% = row_count %>);
<% = name %>.setColumnCount(<% = column_count %>);
<% = name %>.setDataText(function(i, j){return <% = name %>_data[i][j]});
<% = name %>.setColumnText(function(i){return <% = name %>_columns[i]});
var alternate = function(){
return this.getRowProperty("order") % 2 ? "#fffa0" : "#ffffff";
}
var row = new Active.Templates.Row;
row.setStyle("background", alternate);
<% = name %>.setTemplate("row", row);
document.write(obj);
}
catch (error){
document.write(error.description);
}
</script><%
=============================================
end ASP
Begin javascript output (less masive grid data)
=============================================
var obj_columns = [ *** omitted data ***];
var obj_data = [ *** omitted data ***];
try {
var obj= new Active.Controls.Grid;
obj.setRowCount(32);
obj.setColumnCount(17);
obj.setDataText(function(i, j){return obj_data[i][j]});
obj.setColumnText(function(i){return obj_columns[i]});
var alternate = function(){
return this.getRowProperty("order") % 2 ? "#fffa0" : "#ffffff";
}
var row = new Active.Templates.Row;
row.setStyle("background", alternate);
obj.setTemplate("row", row);
document.write(obj);
}
catch (error){
document.write(error.description);
===================================================
end Javascript
the javascript runs with no errors, the talbe displays just fine, but no alternating row color?
Any help would be appriciated:)
I seem to be a java-neandertal and for the life of me, I cant figure out what stupid little mistake I am making to prevent my row colors from working.. .
ASP code (modified activewidgets_grid, found in activewidgets.asp) :
====================================================
<script>
<% response.write columns & vbNewLine
response.write rows & vbNewLine %>
try {
var <% = name %>= new Active.Controls.Grid;
<% = name %>.setRowCount(<% = row_count %>);
<% = name %>.setColumnCount(<% = column_count %>);
<% = name %>.setDataText(function(i, j){return <% = name %>_data[i][j]});
<% = name %>.setColumnText(function(i){return <% = name %>_columns[i]});
var alternate = function(){
return this.getRowProperty("order") % 2 ? "#fffa0" : "#ffffff";
}
var row = new Active.Templates.Row;
row.setStyle("background", alternate);
<% = name %>.setTemplate("row", row);
document.write(obj);
}
catch (error){
document.write(error.description);
}
</script><%
=============================================
end ASP
Begin javascript output (less masive grid data)
=============================================
var obj_columns = [ *** omitted data ***];
var obj_data = [ *** omitted data ***];
try {
var obj= new Active.Controls.Grid;
obj.setRowCount(32);
obj.setColumnCount(17);
obj.setDataText(function(i, j){return obj_data[i][j]});
obj.setColumnText(function(i){return obj_columns[i]});
var alternate = function(){
return this.getRowProperty("order") % 2 ? "#fffa0" : "#ffffff";
}
var row = new Active.Templates.Row;
row.setStyle("background", alternate);
obj.setTemplate("row", row);
document.write(obj);
}
catch (error){
document.write(error.description);
===================================================
end Javascript
the javascript runs with no errors, the talbe displays just fine, but no alternating row color?
Any help would be appriciated:)
Ron
January 22,