ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: hugmax on May 23, 2017, 05:13:26 pm
-
I have this code in PHP.
I am adding rows and some qty cell has to be disabled (I add a class to the cell) if price is 0.
How can I do the same with pqgrid?
foreach ($result as $p) {
if($grupo != $p['grupo']){
echo '<tr><td class="celda-header-grupo" colspan="21">'.$p['grupo'].'</td></tr>';
$grupo = $p['grupo'];
}
if($subgrupo != $p['familia']){
echo '<tr><td class="celda-header-subgrupo" colspan="21">'.$p['familia'].'</td></tr>';
$subgrupo = $p['familia'];
}
if($familia != $p['gama']){
echo '<tr><td class="celda-header-familia" colspan="21">'.$p['gama'].'</td></tr>';
$familia = $p['gama'];
}
if($subfamilia != $p['subgama']){
echo '<tr><td class="celda-header-subfamilia" colspan="21">'.$p['subgama'].'</td></tr>';
$subfamilia = $p['subgama'];
}
?>
<tr>
<td><?php echo $p['imagen']; ?></td>
<td><?php echo $p['nombre']; ?></td>
<td><?php echo $p['ref']; ?></td>
<td class="number"><?php echo $p['unidad']; ?></td>
<td class="number"><?php echo $p['blister']; ?></td>
<td class="number"><?php echo $p['cajaL']; ?></td>
<td class="number"><?php echo $p['cajaS']; ?></td>
<td class="number"><?php echo $p['palets']; ?></td>
<td class="number"><?php echo $p['display']; ?></td>
<td class="number" ><?php echo $p['priceUnit']; ?></td>
<td class="number"><?php echo $p['priceBlister']; ?></td>
<td class="number"><?php echo $p['priceCajaL']; ?></td>
<td class="number"><?php echo $p['priceCajaS']; ?></td>
<td class="number"><?php echo $p['pricePalet']; ?></td>
<td class="number"><?php echo $p['priceDisplay']; ?></td>
<td<?=($p['priceUnit']==0)?' class="unwritable"':' class="number editable"';?>><?php echo $p['pesoUnidad']; ?></td>
<td<?=($p['priceBlister']==0)?' class="unwritable"':' class="number editable"';?>><?php echo $p['pesoBlister']; ?></td>
<td<?=($p['priceCajaL']==0)?' class="unwritable"':' class="number editable"';?>><?php echo $p['pesoCajaL']; ?></td>
<td<?=($p['priceCajaS']==0)?' class="unwritable"':' class="number editable"';?>><?php echo $p['pesoCajaS']; ?></td>
<td<?=($p['pricePalet']==0)?' class="unwritable"':' class="number editable"';?>><?php echo $p['pesoPalet']; ?></td>
<td<?=($p['priceDisplay']==0)?' class="unwritable"':' class="number editable"';?>><?php echo $p['pesoDisplay']; ?></td>
</tr>
<?php // el fin del foreach
best regards,
-
my way if doing that for whole columns
$("#grid").pqGrid( 'getColumn', { dataIndx: xy}).editable = false;
for (i = 0; i < contentarray.length; i++){
$("#grid").pqGrid( "addClass", {dataIndx: xy, rowIndx: i, cls: 'yourclass'} );
}
$("#grid").pqGrid( "option" , "dataModel.data",contentarray );
$("#grid").pqGrid( "refreshDataAndView" );
-
thanks for reply.
I want to replicate this screen:
(https://preview.ibb.co/edvFSa/dapac.png) (https://ibb.co/kw0RYF)
fotos a tamaƱo real (https://es.imgbb.com/)
With a sticky title bar, and also a footer.
regards