3.2.0

How change the table size?

can be changed size of the table? that it is but great? It wanted that it is possible to be printed but they do not print all columnas.
ok?
Gracias
Paula
Sorry, but my english is very bad!!

//////
<?php

$inventario = @mysql_connect('localhost', 'user', 'pass');
@mysql_select_db('stock', $inventario);
$query = 'SELECT * FROM clientes LIMIT 0,20';
$dataset = @mysql_query($query, $inventario);


// print MySQL query results as 2D javascript array
function aw_cells($dataset){

$rows = array();
while ($record = @mysql_fetch_row($dataset)) {
$cols = array();
foreach ($record as $value) {
$cols[] = '"'.addslashes($value).'"';
}
$rows[] = "\t[".implode(",", $cols)."]";
}
echo "[\n".implode(",\n",$rows)."\n];\n";
}

// print MySQL field names as javascript array
function aw_headers($dataset){
while ($field = @mysql_fetch_field($dataset)) {
$cols[] = '"'.$field->name.'"';
}
echo "[".implode(",",$cols)."];\n";
}

?>
<html>
<head>


<!-- include AW stylesheet and script -->
<link href="runtime/styles/xp/aw.css" rel="stylesheet" type="text/css" ></link>
<script src="runtime/lib/aw.js"></script>
</head>
<body>

<script>

// insert javascript arrays produced by PHP functions
var myHeaders =["Nombre","Cód. Navision","Fecha alta","Usuario alta","Fecha modif.","Usuario modif.","fecha baja","Usuario baja cliente","Motivo baja"]
var myCells = <?= aw_cells($dataset) ?>

// create grid control
var obj = new AW.UI.Grid;

// set grid text
obj.setHeaderText(myHeaders);
obj.setCellText(myCells);

// set number of columns/rows
obj.setColumnCount(myHeaders.length);
obj.setRowCount(myCells.length);


// write grid to the page
document.write(obj);

</script>
</body>
</html>

paula enews@iespana.es
May 4,
You can change the size of each control with setSize() method -

http://www.activewidgets.com/aw.system.html/setsize.html
Alex (ActiveWidgets)
May 4,
Thank you!!!!!!

Paula
May 6,

This topic is archived.

See also:


Back to support forum