SMART datagrid v.1 > Classes > GroupRow

Back  Forward

DataLudi.GroupRow.getVar  method

When summaryMode of GridBase.rowGroup is not NONE, it will return the variance value by calculating the sum of field values specified by parameter field among data row of belonging to this group. 

If set parameter n as 0, it will be "population variance(Varp)", and if set as 1, it will be "sample variance(Var)" value. 

function getVar (field: Integer): Number;
Returns
Number
Parameters
field - Integer. required.
Code -1
    $('#getVar').click(function () {
        var row = grid.focusedRow();
        if (row instanceof GroupRow) {
            var v = row.getVar(0, 0);
            $('#var').val(v);
        }
    });
See Also
getNumber
getSum
getMax
getMin
getAvg
getStdev
Examples
Row Grouping
Merged Mode Grouping
Column Footer