3.2.0

Problems to run grid in firefox.

Good afternoon,

When I run my grid on firefox, I can't see the rollbar, and when I use the arrow down or arrow up keys in keyboard he goes up and down in the roll instead of passing the itens. I would like to know what I'm doing wrong, because I've seen examples runing ok.

My code:

// define data formats
var str = new AW.Formats.String;
var num = new AW.Formats.Number;

obj.setCellFormat([str, str, str, num]);

// provide cells and headers text
obj.setCellText(myData);
obj.setHeaderText(myColumns);

// set number of rows/columns
obj.setRowCount(<?=$rows?>);
obj.setColumnCount(6);

obj.setCellEditable(false);

// enable row selectors
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){
return this.getRowPosition(i)+1}
);

function focusGrid() {
obj.element().focus();
}

// set headers width/height
obj.setSelectorWidth(28);
obj.setHeaderHeight(20);

// set row selection
obj.setSelectionMode("single-row");

// set click action handler
obj.onCellClicked = function(event, col, row){
window.status = this.getCellText(col, row)

};
// write grid html to the page
strmydata = myData.toString();
document.write(obj);

Thanks
Eric Saboia
May 30,
The code itself looks ok - are you sure the problem is still there if you put this code into the empty page? I guess there should be something else which triggers this problem...
Alex (ActiveWidgets)
May 30,
Entire test code page:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="grid/styles/xp/aw.css" rel="stylesheet" type="text/css" ></link>
<script src="grid/lib/aw.js"></script>


<!-- grid format -->
<style>
.aw-grid-control {height: 415px; width: 825px; margin: 0px; border: none; font: menu;}
.aw-row-selector {text-align: center}

.aw-column-0 {width: 235px;}
.aw-column-1 {width: 235px;}
.aw-column-2 {width: 45px;}
.aw-column-3 {width: 70px;}
.aw-column-4 {width: 70px;}
.aw-column-5 {width: 120px;}
.aw-column-6 {width: 50px;}

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

body { background-color: #FFFFFF; }
</style>


<!-- grid data -->
<script>
// create ActiveWidgets Grid javascript object
var obj = new AW.UI.Grid;
window.obj= obj;

var myData = [];
var myKeys = [];

myData[0] = ['VALVULA EQUALIZADORA 40BAR','CVT MAR CHEVY 81/07.86','','00001.','55.5','5207 94615396'];
myData[1] = ['VALVULA EQUALIZADORA 25BAR','CVT 08.86/93 MZ 88/96 KDT IPAN 89/','','00001.0','','5450 5724 6099 94651639'];
myData[2] = ['VALVULA EQUALIZADORA 35BAR','OP CAR 4 6 CIL 81/93 FR TAMB TS','','00001.1','50.45','5208 94615408'];
myData[3] = ['VALVULA PROPORCIONADORA','IPAN 89/','','00001.12','690.87','5699 90235472'];
myData[4] = ['VALVULA EQUALIZADORA 35BAR','VECT 96/ S ABS','','00001.13','','5878 93244724'];
myData[5] = ['VALVULA EQUALIZADORA 30BAR','MAR CHEVY 08.86/95 CORSA CORSA SEDAN','','00001.18','','5735 5451 5708 5924 6100'];
myData[6] = ['VALVULA EQUALIZADORA 45BAR','OP CAR 4 6 CIL 81/93 FR TAMB TS','','00001.2','50.45','5209 94624565'];
myData[7] = ['VALVULA PROPORCIONADORA','A C D 10 20 03.93/ CHASSI LONGO','','00001.23','148.74','5573 93206259'];
myData[8] = ['VALVULA PROPORCIONADORA','A C D 10 20 03.93/ CHASSI CURTO','','00001.24','154.21','5647 93227823'];
myData[9] = ['VALVULA PROPORCIONADORA','S 10 95/','','00001.25','143.08','5706 93224966'];
myData[10] = ['VALVULA RETENCAO VACUO','CVT CHEVY MAR 08.86/95 MZ KDT IPAN 82/99','','00001.27','','5365 4651625'];
myData[11] = ['VALVULA RETENCAO VACUO','CVT MAR 08.86/93 CHEVY 08.86/95','','00001.28','','5510'];
myData[12] = ['VALVULA EQUALIZADORA 25BAR','MZ 82/87 OP CAR 4 6 CIL 91/93','','00001.3','63.41','5312 5511 52253371'];
myData[13] = ['VALVULA EQUALIZADORA 15BAR','A C D 10 20 81/07.88','','00001.4','55.5','5210 94614854'];
myData[14] = ['VALVULA EQUALIZADORA 15BAR','A C D 10 20 08.88/02.93','','00001.5','55.5','5453 52225380'];
myData[15] = ['VALVULA PROPORCIONADORA','A C D 40 6000 84/','','00001.6','187.45','5452 94632239'];
myData[16] = ['CAVALETE E','CVT MAR 73/93 CHEVY 83/95','','00002.','287.88','5789 5444 94651621'];
myData[17] = ['CAVALETE D','CVT MAR 73/93 CHEVY 83/95','','00003.','287.88','5790 5445 94651622'];
myData[18] = ['CAVALETE E','OP CAR 10.79/03.91','','00005.','557.01','5025 94608789'];
myKeys[18] = ['19'];
myData[19] = ['CAVALETE D','OP CAR 10.79/03.91','','00006.','557.01','5026 94608790'];
myData[20] = ['CAVALETE E','VECT 93/','','00006.1','238.73','5659 90425471'];
myData[21] = ['CAVALETE D','VECT 93/','','00006.2','238.73','5660 90425472'];
myData[22] = ['CAVALETE E','CORSA 1.0 1.4 1.6 94/','','00006.3','231.71','5650 90473341'];
myData[23] = ['CAVALETE D','CORSA 1.0 1.4 1.6 94/','','00006.4','243.9','5651 90473342'];
myData[24] = ['CAVALETE E','CORSA SEDAN PICK UP 95/','','00006.5','320.11','5656 93228377'];

// Título das colunas.
var myColumns = ["Especificação", "Aplicação", "Saldo", "Código","Preço","Nº Fabrica"];

// define data formats
var str = new AW.Formats.String;
var num = new AW.Formats.Number;

obj.setCellFormat([str, str, str, num]);

// provide cells and headers text
obj.setCellText(myData);
obj.setHeaderText(myColumns);

// set number of rows/columns
obj.setRowCount(25);
obj.setColumnCount(6);

obj.setCellEditable(false);

// enable row selectors
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){
return this.getRowPosition(i)+1}
);

function focusGrid() {
obj.element().focus();
}

// set headers width/height
obj.setSelectorWidth(28);
obj.setHeaderHeight(20);

// set row selection
obj.setSelectionMode("single-row");

// set click action handler
obj.onCellClicked = function(event, col, row){
window.status = this.getCellText(col, row)

};

document.write(obj);
</script>
</head>

<body>
</body>
</html>
Eric Saboia
May 31,
Sorry... the problem is my aw.js. Thanks
Eric Saboia
May 31,

This topic is archived.

See also:


Back to support forum