text column size is larger than the title column size ????
I have the following script in my page
<STYLE>
#grid1 {height: 250px; background: white; font-size: 10px;}
</STYLE>
<script>
var rows; // later I will set the number of rows in this variable
var data = new Array();
var cols = ["id", "Name", "Description", "City"];
/*..
here I make an XMLHTTPRequest to get the data to fill
the array which will be used to feed the grid
then I calculate the number of rows and put the
value in the var "rows"
..*/
var obj = new Active.Controls.Grid;
obj.setId("grid1");
obj.setColumnProperty("count", 4);
obj.setRowProperty("count", rows);
obj.setDataProperty("text", function(i, j){return data[i][j]});
obj.setColumnProperty("text", function(i){return cols[i]});
document.write(obj);
</script>
The grid shows the data I get form the server with XMLHTTPRequest
BUT the title of the columns that I take from cols variable are shorter than the columns with the data. In looks like this
id Name Description City
1 name1 description1 city1
2 name2 description2 city2
.. ... .... ...
I try to edit the style to set the width of the columns (as I see in the tutorial ) but the size of the zero column (.active-column-0 {width: 10px; }) never change however the width of the other 3 columns can be rezisable the zero column never change
This works the same in FireFox 1.0 and IE6 shows the data but the visual style of the data columns is significantly moved to the right
Any help ?
Other thig is: I always include "grid.js" in the page I'm working but I have notice that it take a lot of time to load it the first time. that is, I think, because the script "grid.js" makes a : <script type="text/javascript" src="/grid/lib/*">.... of all the scripts inside "grid/lib". Anyway, I have seen that active widgets pages load very fast the grids so I try to include only the js I supossed I was using but that was a mess. Can anyone give me a Tip to make my pages load it's grids more quickly ?
J. Pablo M Vidal
<STYLE>
#grid1 {height: 250px; background: white; font-size: 10px;}
</STYLE>
<script>
var rows; // later I will set the number of rows in this variable
var data = new Array();
var cols = ["id", "Name", "Description", "City"];
/*..
here I make an XMLHTTPRequest to get the data to fill
the array which will be used to feed the grid
then I calculate the number of rows and put the
value in the var "rows"
..*/
var obj = new Active.Controls.Grid;
obj.setId("grid1");
obj.setColumnProperty("count", 4);
obj.setRowProperty("count", rows);
obj.setDataProperty("text", function(i, j){return data[i][j]});
obj.setColumnProperty("text", function(i){return cols[i]});
document.write(obj);
</script>
The grid shows the data I get form the server with XMLHTTPRequest
BUT the title of the columns that I take from cols variable are shorter than the columns with the data. In looks like this
id Name Description City
1 name1 description1 city1
2 name2 description2 city2
.. ... .... ...
I try to edit the style to set the width of the columns (as I see in the tutorial ) but the size of the zero column (.active-column-0 {width: 10px; }) never change however the width of the other 3 columns can be rezisable the zero column never change
This works the same in FireFox 1.0 and IE6 shows the data but the visual style of the data columns is significantly moved to the right
Any help ?
Other thig is: I always include "grid.js" in the page I'm working but I have notice that it take a lot of time to load it the first time. that is, I think, because the script "grid.js" makes a : <script type="text/javascript" src="/grid/lib/*">.... of all the scripts inside "grid/lib". Anyway, I have seen that active widgets pages load very fast the grids so I try to include only the js I supossed I was using but that was a mess. Can anyone give me a Tip to make my pages load it's grids more quickly ?
J. Pablo M Vidal
J. Pablo M. Vidal
May 16,