Ejemplo n.º 1
0
        public static double Avg(ReoGridControl ctrl, ReoGridRange range)
        {
            double val = 0;
            int count = 0;

            ctrl.IterateCells(range, (row, col, cell) =>
            {
                if (cell != null && ScriptRunningMachine.IsNumber(cell.Data))
                {
                    val += ScriptRunningMachine.GetDoubleValue(cell.Data);
                    count++;
                }
                return true;
            });

            return val / count;
        }
Ejemplo n.º 2
0
        public static double Count(ReoGridControl ctrl, ReoGridRange range)
        {
            int count = 0;

            ctrl.IterateCells(range, (row, col, cell) =>
            {
                count++;
                return true;
            });

            return count;
        }