:: Forum >>
Scrolling the grid
I have the grid displaying the way I want, with the following code in my aspx file. THe javascript array is create by server-side code:
<body>
<%
// write the data arrays out. see the codebehind aspx.cs
// for scriptstr initialization.
Response.Write(scriptstr);
%>
<script>
// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;
// set number of rows/columns
obj.setRowProperty("count", myArray.length);
obj.setColumnProperty("count", 5);
// provide cells and headers text
obj.setDataProperty("text", function(i, j){return myArray[i][j]});
obj.setColumnProperty("text", function(i){return myCols[i]});
var alternate = function(){
return this.getProperty("row/order") % 2 ? "threedface" : "white";
}
var row = new Active.Templates.Row;
row.setStyle("background", alternate);
obj.setTemplate("row", row);
document.write(obj);
</script>
</body>
Great. This is from your examples, and works fine. The only problem is, I do not have any scroll bars. How do I place a limiting window around the grid so I get scroll bars?
Thanks
RichF
Wednesday, September 8, 2004
OK I got it. I enclosed the aspx page in an iframe,
<iframe name="myframe" src="browsetrans.aspx name="browsetrans" id="browsetrans" frameborder=no scrolling=no style="width:100%;height=90%;border:none;"></iframe>
and got the scroll bars I was look ing for.
RichF
Wednesday, September 8, 2004
This topic is archived.
Back to support forum
Forum search