footerrow

Questionsfooterrow
Virginia Domínguez asked 11 years ago

Hola estoy tratando de obtener los totales de unas columnas de un jqgrid usando footerrow, pero aun no logro completar la función podrian por favor ayudarme con un ejemplo al agregar el $grid["footer"]= true;
Estoy utilizando el pack "phpgrid-full-v1.4.8".
Espero puedan ayudarme…

1 Answers
Abu Ghufran answered 11 years ago

Please do these changes to enable footer summary row.

Step1:

$grid["footerrow"] = true;

$g->set_options($grid);

Step2: Add custom JS code as mentioned.'list1' is the identifier for grid.In function 'getCol', 2nd param 'field1' is the name of column, which will show the summary data. Valid options for mathoperation (4th param) are – 'sum, 'avg', 'count'.

<div style="margin:0px;">
<script>
var opts = {

'loadComplete': function () {
var grid = $("#list1"),
sum = grid.jqGrid('getCol', 'field1', false, 'sum');
grid.jqGrid('footerData','set', {field1: 'Total: '+sum});
}
};
</script>

<?php echo $out?>
</div>

Let me know for further help.

———————

using http://translate.google.com

Por favor, hacer estos cambios para permitir fila de resumen pie de página.

Paso 1:

$grid["footerrow"] = true;

$g->set_options($grid);

Paso 2: Agregar código personalizado JS como se menciona "list1" es el identificador de 'getCol "función grid.In,' campo1 'param segundo es el nombre de la columna, que mostrará los datos de resumen. Las opciones válidas para mathoperation param (cuarto) son – 'sum, 'avg', 'count'.

     <div style="margin:0px;">
<script>
var opts = {

'loadComplete': function () {
var grid = $("#list1"),
sum = grid.jqGrid('getCol', 'field1', false, 'sum');
grid.jqGrid('footerData','set', {field1: 'Total: '+sum});
}
};
</script>

<?php echo $out?>
</div>

Your Answer

13 + 15 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?