protected function calculateColumnWidthPercent(array $columns)
    {
        $widthAllColumn = 0;
        foreach ($columns as $column) {
            /* @var $column \ZfcDatagrid\Column\AbstractColumn */
            $widthAllColumn += $column->getWidth();
        }

        $widthSum = 0;
        // How much 1 percent columnd width is really "one" percent...
        $relativeOnePercent = $widthAllColumn / 100;

        foreach ($columns as $column) {
            $widthSum += (($column->getWidth() / $relativeOnePercent));
            $column->setWidth(($column->getWidth() / $relativeOnePercent));
        }
    }
protected function calculateColumnWidthPercent(array $columns)
    {
        $widthAllColumn = 0;
        foreach ($columns as $column) {
            /* @var $column \ZfcDatagrid\Column\AbstractColumn */
            $widthAllColumn += $column->getWidth();
        }

        $widthSum = 0;
        // How much 1 percent columnd width is really "one" percent...
        $relativeOnePercent = $widthAllColumn / 100;

        foreach ($columns as $column) {
            $widthSum += (($column->getWidth() / $relativeOnePercent));
            $column->setWidth(($column->getWidth() / $relativeOnePercent));
        }
    }
protected function calculateColumnWidthPercent ( array $ columns ) { $ widthAllColumn = 0 ; foreach ( $ columns as $ column ) { /* @var $column \ZfcDatagrid\Column\AbstractColumn */ $ widthAllColumn += $ column -> getWidth ( ) ; } $ widthSum = 0 ; // How much 1 percent columnd width is really "one" percent... $ relativeOnePercent = $ widthAllColumn / 100 ; foreach ( $ columns as $ column ) { $ widthSum += ( ( $ column -> getWidth ( ) / $ relativeOnePercent ) ) ; $ column -> setWidth ( ( $ column -> getWidth ( ) / $ relativeOnePercent ) ) ; } }
Calculate the sum of the displayed column width to 100%.

@param array $columns
Calculate the sum of the displayed column width to 100% .