From a field formula, I need to return a value, which is calculated by getting the sum of a field ("aaa") for all rows where a field "bbb" is less than the current row's "bbb" value.
I don't know how to iterate the grid rows from a formula, to compare the values to the current rows values.
formulas: [
['MyCalField', function (rd) {
return [calculated value]
}
]
//this doesnt work in a formula:
var grid = $gridMain.pqGrid('instance');
var selCount = 0;
grid.Selection().eachRow(function (rowData, rowIndx) {
selCount += 1;
})